I made a script that uses PlayerAdded() but when I test it in studio it doesn't work but when I test it on the website it works perfectly. I looked at the output and nothing comes out. Am I doing something wrong?
wait(0.1) local Radius = script.Parent local CharacterPoint = nil game.Players.PlayerAdded:connect(function(player) wait(5) local Character = player.Character CharacterPoint = Character:FindFirstChild("Head") end)
PS: I'm using FE if that helps.
You should use CharacterAdded and WaitForChild:
local CharacterPoint game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(Character) CharacterPoint = Character:WaitForChild("Head") end) end)