I think it is for numbers which makes since and I want to use it in my script for an IntValue.
This script wont work and this is why I think I might need Enum
local function partTouched(onTouch)
local leaderstats = game.Players:FindFirstChild("Folder")
local intvalue = leaderstats:FindFirstChild("IntValue")
if intvalue.Name == "FlexBux" then
intvalue.Value = intvalue.Value + 20
end
end
script.Parent.Touched:Connect(partTouched)
here is what it says in the output:
16:09:51.715 - Workspace.Lobby.Obby.Part.Script:3: attempt to index nil with 'FlexBux'<

3 comments
When I use that it gives me in the output 16:38:28.717 - Workspace.Lobby.Obby.Part.Script:7: Expected identifier when parsing expression, got ')'
oh that means you need to add an end
why would i need another end there is no if statements or anything