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

LoadCharacter and TeamColor aren't working?

Asked by
c5or 8
7 years ago

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?

0
Is your FE(FilteringEnabled) on? If so it's pretty normal. FE blocks communication of Local-Server. superalp1111 662 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Well. It could be for different reasons. Im guessing either you din't know how to use BuiltInFunctions 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.

0
I'll give it a shot, thanks. c5or 8 — 7y
Ad

Answer this question