Hello, I’m a beginner in scripting, and I can’t figure out why my coin-giver script isn’t working:
The script function is to give the user coins when I touch/step on the block. Any help is appreciated
Hello, I’m a beginner in scripting, and I can’t figure out why my coin-giver script isn’t working:
The script function is to give the user coins when I touch/step on the block. Any help is appreciated
Hey, greetings!
There seems to be missing a end
at line 22.
To be more clear, add a end
between these lines:
coins.Value - coins.Value + 1;
AND
end
IT MIGHT LOOK LIKE
local coinGiver = game.Workspace.CoinGiver;
coinGiver.Touched:Connect(function(otherpart)
local humanoid = otherpart.Parent:FindFirstChild("Humanoid");
if humanoid then
coins.Value = coins.Value + 1;
end
end
Also, be sure to not add the while
loop here, as it isn’t necessary and will make you experience unplayable.
Tell me if you need any more help!
First: Check screenshot
Second: It’s not a good idea to put the loop here
Ohhh i understand now, thank youuuuuuuuuuuuu!!
The script works now, TYSM!!!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.