Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Tool works in studio however not in the actual game?

Asked by 8 years ago
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

Log in to vote
0
Answered by 8 years ago
--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.
Ad

Answer this question