Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This function doesen't execute?

game.Players.LocalPlayer.Character.functiondummy.Value  = math.random(1, 99999999)

game.Players.LocalPlayer.Character.functiondummy.Changed:connect(function()

(everything with the function itself is fine, there are no errors)

This function just plain out doesen't execute even with the obvious presented above. Any fixes?

1 answer

You have to put the code inside the event.

local plr = game.Players.LocalPlayer

plr.Character.functiondummy.Changed:connect(function()
	plr.Character.functiondummy.Value  = math.random(1, 99999999)
end)

2 comments

0

I think the problem here is that you actually need to wait for the character to load before you can do anything with it.

0

Um, what? All that's doing is making it loop forever and use up cpu power. Im trying to use the Changed event to trigger a function just by changing it's value (therefore triggering it simply), but it doesen't respond.

This discussion is preserved as it was. New answers, comments, and votes are closed.