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

Tool works in studio however not in the actual game?

wait(1)
function Active(m)
function Click()
script.Parent.Parent.Parent.Character["Left Arm"].Transparency = 1
script.Parent.Parent.Parent.Character["Torso"].Transparency = 1
script.Parent.Parent.Parent.Character["Left Leg"].Transparency = 0
script.Parent.Parent.Parent.Character["Right Arm"].Transparency = 1
script.Parent.Parent.Parent.Character["Right Leg"].Transparency = 0
script.Parent.Parent.Parent.Character.Head.Transparency = 1
wait(20)
script.Parent.Parent.Parent.Character["Left Arm"].Transparency = 0
script.Parent.Parent.Parent.Character["Torso"].Transparency = 0
script.Parent.Parent.Parent.Character["Left Leg"].Transparency = 0
script.Parent.Parent.Parent.Character["Right Arm"].Transparency = 0
script.Parent.Parent.Parent.Character["Right Leg"].Transparency = 0
script.Parent.Parent.Parent.Character.Head.Transparency = 0
end
m.Button1Down:connect(Click)
end

script.Parent.Selected:connect(Active)

So i'm making a stealth script but it doesn't work in game only in studio the tool is a HopperBin just so you know. I've tried doing things like the wait(1) on line 1 but its not making a difference.

1 answer

--Put this code in a localscript in a HopperBin and make sure the hopperbin is in the StarterPack.
--And your loadstring in serverscriptservice should be enabled as well.
wait(1)
function Active(m)
function Click()
script.Parent.Parent.Parent.Character["Left Arm"].Transparency = 1
script.Parent.Parent.Parent.Character["Torso"].Transparency = 1
script.Parent.Parent.Parent.Character["Left Leg"].Transparency = 0
script.Parent.Parent.Parent.Character["Right Arm"].Transparency = 1
script.Parent.Parent.Parent.Character["Right Leg"].Transparency = 0
script.Parent.Parent.Parent.Character.Head.Transparency = 1
wait(20)
script.Parent.Parent.Parent.Character["Left Arm"].Transparency = 0
script.Parent.Parent.Parent.Character["Torso"].Transparency = 0
script.Parent.Parent.Parent.Character["Left Leg"].Transparency = 0
script.Parent.Parent.Parent.Character["Right Arm"].Transparency = 0
script.Parent.Parent.Parent.Character["Right Leg"].Transparency = 0
script.Parent.Parent.Parent.Character.Head.Transparency = 0
end
m.Button1Down:connect(Click)
end

script.Parent.Selected:connect(Active)
--Accept my answer if this helped.

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