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

Changing the Character property of a player?

Asked by 7 years ago

So I have an idea for a game where there is a map filled with npc's and a few players and you can like go from controlling one npc to the next. Ive been playing around with the properties of a player but when I change the Character property it deletes the original character. How can I make it so the original one turns back into a npc and doesn't get deleted? BTW - filtering enabled is off for testing.

local Player = game.Players.LocalPlayer
local Mouse =  Player:GetMouse
function Click()
 if Mouse.Target.Parent:FindFirstChild("Humanoid") then
Player.Character = Mouse.Target.Parent
end
end
Mouse.Button1Click:connect(Click)

0
just clone the character, and have it go to clone Async_io 908 — 7y
0
K i guess... Wafflecow321 457 — 7y

Answer this question