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

How do you change a players character without using startercharacter?

Asked by 5 years ago

Let's start with some context as it might be easier to follow along. I'm making a game where you spawn as either the nightguard or a random animatronic. The nightguard works fine. The issue is the animatronic. At first it works fine, the player posseses the custom character and it all runs pretty smooth. But after about 5 seconds the custom character dissapears and the player resets returning to the base character.

Here is the code: Some context v is the player. v.Character:destroy() local freddy = game.ReplicatedStorage.Animatronics:WaitForChild("Freddy"):Clone() freddy.Parent = workspace freddy.Name = v.Name v.Character = freddy

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Hello! For achieving what you want, you would have to use RemoteEvents, in order to make a Client-Server connection that changes the player's character for the whole server, not just the certain client(Player). You would fire the remote in a LocalScript, then when the RemoteEvent picks the request up, it would change the character in a Script that is located in ServerScriptService.

Hope this helps! Make sure to mark as solution if useful.

0
Hi, haven’t had time to test but it might be important to mention that the code is running inside a serverscript not a localscript. Paragonixy 2 — 5y
Ad

Answer this question