Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Character goes mad (error) when I died?!?

So this is the last part of my FilteringEnabling script, character goes error when I died saying it was a nil value. Also goes with the Humanoid. So I found a person to try out game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name) but also not works... Any ways to fix this now?

If you don't know what I mean, this is how it worked

Player used a script that is FilteredEnabled but reset because someone OOFed him, and then Player got an error because he died, and he looked Developer Console and saw that local character was a nil value for now, but before that happened it was true before.

local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local character = player.Character or game.Players.LocalPlayer.CharacterAdded:Wait() --wow noice i got oofed then wait.. what? does not work? but character will revive! what the

1 comment

0

Please show all of the scripts, and copy the error, I don't have a clue what you are talking about..

1 answer

Whoa! xd

Just add a wait(1) to the top of the script.

2 comments

0

it worked but when i tried to die it still got an error..

0

add a ypcall function into it

This discussion is preserved as it was. New answers, comments, and votes are closed.