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

The following scripts work in studio but not in a real server?

Asked by 8 years ago

I was testing a GUI (it's an admin console) and it worked fine in studio.

Then I saved my work and went to a real server. It didn't do anything. Absolutely nothing.

I just wanted to show the following scripts that work in studio, but not in a real server (if you could help): -- EXPLODE SCRIPT --

submit = script.Parent.Parent.ExplodeUser
btn = script.Parent
btn.MouseButton1Click:connect(function()
for i,v in pairs(game.Players:GetChildren())do
    if v.Name == submit.Text then
        explosion = Instance.new("Explosion",game.Workspace)
        explosion.Position = v.Character.Torso.Position
        wait(3)
        explosion:Destroy()
    end
end
end)

-- GOD SCRIPT --

submit = script.Parent.Parent.GodUser
btn = script.Parent
btn.MouseButton1Click:connect(function()
    for i,v in pairs(game.Players:GetChildren()) do
        if v.Name == submit.Text then
            v.Character.Humanoid.MaxHealth = math.huge
            v.Character.Humanoid.Health = math.huge


        end
    end
end)

-- KICK SCRIPT --

submit = script.Parent.Parent.KickUser
btn = script.Parent
btn.MouseButton1Click:connect(function()
    for i,v in pairs(game.Players:GetChildren()) do
        if v.Name == submit.Text then
            v:Kick()


        end
    end
end)

THERE ARE MANY MORE BUT THERE ARE TOO MUCH AND I'M TOO LAZY TO MENTION THEM ALL.

You get the point, so can anyone tell me why it only works in studio?

0
Use prints to see where the script stops. TheDeadlyPanther 2460 — 8y
0
Try changing the script types. General_Scripter 425 — 8y
0
Are these scripts LocalScripts? LittleBigKid2000 75 — 8y

Answer this question