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

When I reset, local character = game.Players.LocalPlayer.Character would error, why?

Asked by 5 years ago

I was making a Noob Magic tool script and it works but when I die or reset,

local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

would error, and I used game:GetService("Chat") to let character say a thing but when I reset it would say the partOrCharacter error, is there any way to make the died player that re-spawned not make the script error? I am using an LocalScript. I also am using the Handle as an placeholder for the game:GetService("Chat"):Chat() void. (because character errors when I died and kept saying the partOrCharacter error)

0
You could do workspace:WaitForChild(game.Players.LocalPlayer.Name) AnonymousDeveloper13 22 — 5y

Answer this question