Questions tagged [luau]

Luau is a scripting language based on Lua 5.1.

The luau language was developed by Roblox. The language's website is at https://luau-lang.org/.

123 questions
0
votes
0 answers

Part doesn't gives damage, Touch event

I made a code but it didn't worked, i tried to change the code but no success. How i can do this? I want to give damage without giving damage to the player. Code here hitpunch.Touched:Connect(function(hit) if hit.Parent:IsA("Model")…
takezo
  • 101
  • 7
0
votes
2 answers

How can I get the quotient of a division in lua?

For my game in roblox, I need the quotient of a division. For example the quotient of 20/3 is 6 and 40/2 is 20. Is there a way to do this using a function?
0
votes
0 answers

How do I prevent hitting the recursion limit in roblox?

So I'm making an obfuscator that basically generates a bunch of variables with the byte value of a char. In the end I have a loadstring that basically combines all the strings into one string. Now, that works fine with small scripts, but its really…
0xE9
  • 1
0
votes
1 answer

Text isn't a valid member of ScreenGui DeathScreen

I tried to make a code that if the player humanoid dies then it connect a function that makes a GUI visible with a death message, but it didn't worked. I did something wrong? (And the player didn't teleport to the part on workspace) Code…
takezo
  • 101
  • 7
0
votes
1 answer

Looking for an OpenPGP implementation in Lua

Are there any OpenPGP implementations in Lua? I could only find one (https://github.com/pvthuyet/LuaOpenPGP) but it's in C++ and i need one in pure Lua. Does anyone have it?
Normantas
  • 17
  • 4
0
votes
1 answer

Attempt to index nil with characterAdded

I need to get the character of the player for a system thats give a damage if a part is touched but this occur by a normal script and not a local script and i want to prevent the character take damage. How i can make this? I tried to make this code…
takezo
  • 101
  • 7
0
votes
1 answer

Attempt to index number with 'Text' how to fix?

I am trying to make a set of labels which update every 2.5 seconds to the values of player attributes, however my attempt does not work, how can I fix this? local StrenghtButton = script.Parent.Frame.Strenght local DFButton =…
takezo
  • 101
  • 7
0
votes
1 answer

When I mine a rock in my game (Click it 10 times) it mines and gives 100 coins. However if someone else does it it gives it to me? Can anyone h3lp?

So when I click it 10 times it mines however it only give coins to me when someone else mines it. I have no clue really what to do so i need help. Ok so here is the script: game.Players.PlayerAdded:Connect(function(player) …
Sippy
  • 1
0
votes
0 answers

How i can make a Attribute Value goes up by a TextButton?

I tried to make a System that when you click a button, then the player attribute goes up by 1 but it didn't worked. I dont know how to do this. Any suggestions? Code below: local localplr = game.Players.LocalPlayer local char = localplr.Character or…
takezo
  • 101
  • 7
0
votes
2 answers

How i can make the parts of a Model be together with primarypart and follow it

I want to make a vfx model primary part go to the Player Character Primary Part, but the parts of the vfx model isn't moving with the model primary part. I tried to weld them but didnt work. What can i do? Code below: local replicated =…
takezo
  • 101
  • 7
0
votes
1 answer

How to make a specific object belong to a Player

I want to make a type of a Spell that belongs to a Player, like a tool stay in Character Backpack but not literally. If a player press a button, the spell will be fired and how i can make this spell belongs to the player that pressed the button?
takezo
  • 101
  • 7
0
votes
2 answers

How i can make a damage system without using Touched

I was trying to make a Kick system in roblox studio, but I don't know a way to make a Humanoid take damage without using the .Touched event, any suggestions? code below: game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player) …
takezo
  • 101
  • 7
0
votes
2 answers

How to change a Text of a TextLabel for a Attribute of the player

I need to change a TextLabel text to a Player Attribute Value but i dont know how to do this. I tried to make a code: local player = game.Players.LocalPlayer function ChangeTextMastery() script.Parent.Frame.CurrentMastery.Text = "Current Mastery…
takezo
  • 101
  • 7
0
votes
1 answer

How do I add a variable into my color3.fromrgb value?

local R = script.Parent.R.Text local G = script.Parent.G.Text local B = script.Parent.B.Text script.Parent.ColorIndicator.BackgroundColor3 = Color3.fromRGB(R, G, B) Ok, so how do I make this work? I'm making a Building Tools like thing that would…
rufu
  • 13
  • 4
0
votes
2 answers

Getting substrings in LuaU

the title might look very stupid but I really can't find out what the problem is, I have created a custom function to substring like the way in C++ because I like it: local function SubStr(String, Start, Count) return String:sub(Start,…
oofsamy
  • 21
  • 1
  • 3
1 2 3
8 9