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

LoadCharacter and TeamColor aren't working?

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?

1 comment

0

Is your FE(FilteringEnabled) on? If so it's pretty normal. FE blocks communication of Local-Server.

1 answer

✓ Accepted answer

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.

1 comment

0

I'll give it a shot, thanks.

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