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

Script that makes players a character model not working?

Asked by 4 years ago

https://imgur.com/2hO9YwN

I'm trying to make the player turn into "the killer" or whatever, but nothing is happening. I'm getting no errors and the script is running. I'm trying to make the players starter character model the killer model when function is run.

1 answer

Log in to vote
0
Answered by 4 years ago

Don't change their Starter Character when the script is run. What you want to do is clone the model, move it to where you want.

Then, set the player's character's Archivable to true. Set Player.Character = clonedModel;, and delete their old character.

It would look something like this:

local model = game.ReplicatedStorage.Model; -- Model to switch to
local c = Player.Character; -- Assumes you declared what Player is
local newModel = model:Clone();
newModel:SetPrimaryPartCFrame(CFrame.new()); -- Move it where you want.
c.Archivable = true;
Player.Character = newModel;
c:Destroy();

You'd also set workspace.CurrentCamera.CameraSubject equal to the newModel clone. You can do this by firing a Remote Event/Function to the Client.

0
Thanks for taking time to answer, sorry I took so long to respond. I did this and setup a remote even and now I am getting a weird camera in space thing. https://imgur.com/a/KuPxov0: this is my main script. https://imgur.com/Z1pKf9r: this is my local script. https://imgur.com/En87Ehu: this is my explorer window. Again, thanks for responding. DevSpyChicken 8 — 4y
Ad

Answer this question