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

OnTouch, wot am i doing wrong?

I Was trying to use the "OnTouch" function. And heres what i did.

game.Workspace.xNurr = z function OnTouch z.Humanoid.WalkSpeed = 100 z.Humanoid.MaxHealth = math.huge end

"z.Humanoid.WalkSpeed = 100" the letter z has a red line under it, what's wrong?

1 answer

Your problem is the line

game.Workspace.xNurr = z 

When defining variables, the variable's name comes first, and the variable's value comes second.

You therefore simply need to reverse that line, i.e.

z = game.Workspace.xNurr

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