I have a script that when you walk into the zombies radius it shows his health (health is in another script) but the radius script works when i'm in studio but not in a server, please help D:
local Player = game.Players.LocalPlayer.Character local Zombie = game.Workspace.Zombie while wait() do if (Player.Torso.Position - Zombie.Torso.Position).magnitude <= 30 then script.Parent.BOSS.Frame.Visible = true else script.Parent.BOSS.Frame.Visible = false end end
This happens because you don't wait for the character to be added.
On line 1, do
local Player = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait()
Now, the script will wait until a character is added, or continue if its already there.