So I quit scripting for awhile, and now LoadCharacter() doesn't work when I try using it in a local script in a MouseButton1Down function. Neither does player.TeamColor Is there a new way for this?
Well. It could be for different reasons. Im guessing either you din't know how to use BuiltInFunction
s or your script isn't waiting for your character to load and continuing without it.
Here's an exmaple of using a BuiltInFunction
in the correct way and making sure that the thing loads first usingYield Functions
.
local player = game.Players local playadd = game.Players:PlayerAdded() function playingadd() print 'Hi' end while playadd do playingadd() end
^^This may or may not work, I haven't tested it. I figured it on the stop so, don't quote me on that but, if it does then you're welcome.
When making Yield Functions
there are some good ones, but I like to use these 2 alot.
repeat wait() until playadd game:WaitForChild("Players"):PlayerAdded()
If this doesn't help then idk how to help you.