So i've made a morph script that will change my custom character. I have the script to where it can work for multiple people, or just one. I haven't found out a way to make it to where it'll only put it onto a player once, then allowing another player to come along and do the same thing. Either it only works for one player, or it will just keep adding on until it lags the server. I've tried using Values and it doesn't seem to work. I tried using the local player thing, but it didn't quite work. Is there any way you can point me in the right direction? I just need a little help with this. Also: I tried using it on a local script but the "hit.Parent" doesn't seem to work with the local script.
--//Script
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
local char = hit.Parent
char:WaitForChild('Head').BrickColor = BrickColor.new('Dusty Rose')
char:WaitForChild('Head thing').BrickColor = BrickColor.new('Dusty Rose')
char:WaitForChild('Head thing 2').BrickColor = BrickColor.new('Dusty Rose')
char:WaitForChild('Left Arm').Transparency = 1
char:WaitForChild('Left Leg').BrickColor = BrickColor.new('Cool yellow')
char:WaitForChild('Right Leg').BrickColor = BrickColor.new('Cool yellow')
--//TornSkin + Stuff for face
char:WaitForChild('Upper Beak').BrickColor = BrickColor.new("Cool yellow")
char:WaitForChild('Lower Beak').BrickColor = BrickColor.new("Cool yellow")
char:WaitForChild('Eye').BrickColor = BrickColor.new('Smoky grey')
char:WaitForChild('Eye 2').Transparency = 1
char:WaitForChild('Tail').BrickColor = BrickColor.new('Sage green')
local TS = ZC:WaitForChild('torn skin')
local ClonedTS = TS:Clone()
ClonedTS.Parent = char
ClonedTS.Main.CFrame = char:WaitForChild('Torso').CFrame
local Weld = Instance.new('ManualWeld')
Weld.Part0 = ClonedTS.Main
Weld.Part1 = char:WaitForChild('Torso')
Weld.C0 = ClonedTS.Main.CFrame:inverse() * char:WaitForChild('Torso').CFrame
Weld.Parent = char:WaitForChild('Torso')
local EB = ZC:WaitForChild('Eye 2')
local ClonedEB = EB:Clone()
ClonedEB.Parent = char
ClonedEB.Main.CFrame = char:WaitForChild('Torso').CFrame
local Weld = Instance.new('ManualWeld')
Weld.Part0 = ClonedEB.Main
Weld.Part1 = char:WaitForChild('Torso')
Weld.C0 = ClonedEB.Main.CFrame:inverse() * char:WaitForChild('Torso').CFrame
Weld.Parent = char:WaitForChild('Torso')
char:WaitForChild('Torso').BrickColor = BrickColor.new("Sage green")
--//Arms
local LA = ZC:WaitForChild('Left Arm')
local ClonedLA = LA:Clone()
ClonedLA.Parent = char
ClonedLA.Main.CFrame = char:WaitForChild('Left Arm').CFrame
local Weld = Instance.new('ManualWeld')
Weld.Part0 = ClonedLA.Main
Weld.Part1 = char:WaitForChild('Left Arm')
Weld.C0 = ClonedLA.Main.CFrame:inverse() * char:WaitForChild('Left Arm').CFrame
Weld.Parent = char:WaitForChild('Left Arm')
char:WaitForChild('Right Arm').BrickColor = BrickColor.new('Sage green')
end
end)
