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?

3 comments
Use prints to see where the script stops.
Try changing the script types.
Are these scripts LocalScripts?