You can write your topic however you want, but you need to answer these questions:
Trying to make a murderer ability called Disguise where it takes a character from replicatedstorage and changes your disguise
It’s only happening locally, and to everyone else, you become naked and weird.
What I see
What the user sees
local used = false
function applyChar(player,char)
for _,e in ipairs(player.Character:GetChildren()) do
if e.className==“Hat” or e.className==“Shirt” or e.className==“Pants” or e.className==“CharacterMesh” then
e:Remove()
end
end
player.Character.Head2:Remove()
for _,e in ipairs(char:GetChildren()) do
if e.Name==“Head” then
local h2 = e:Clone()
h2.Anchored = false
h2.Name = “Head2”
player.Character.Head.Transparency = 1
Instance.new(“Weld”).Parent = h2
h2.Weld.Part0 = player.Character.Head
h2.Weld.Part1 = h2
h2.Parent = player.Character
if h2:FindFirstChild(“face”)~=nil then
player.Character.Head.face.Texture = h2.face.Texture
h2.face:Remove()
end
player.Character.Torso.BrickColor = h2.BrickColor
player.Character[“Right Arm”].BrickColor = h2.BrickColor
player.Character[“Left Arm”].BrickColor = h2.BrickColor
player.Character[“Right Leg”].BrickColor = h2.BrickColor
player.Character[“Left Leg”].BrickColor = h2.BrickColor
if char.Name==“Flinn” then
h2.BrickColor = BrickColor.new(“Light orange”)
end
player.Character.Humanoid.CharName.Value = char.Name
workspace.GameScript.NameGui:Clone().Parent = h2
h2.NameGui.Display.Text = char.Name
h2.NameGui.Display.Visible = true
h2.NameGui.PlayerToHideFrom = player
elseif e.Name==“Handle” then
local hat = Instance.new(“Hat”)
hat.AttachmentPoint = e.CFrame:inverse()(char.Head.CFrameCFrame.new(0,0.5,0))
e:Clone().Parent = hat
hat.Handle.FormFactor = “Custom”
hat.Handle.Size = Vector3.new(0.2,0.2,0.2)
hat.Handle.Anchored = false
hat.Parent = player.Character
else
e:Clone().Parent = player.Character
end
end
end
script.Parent.Selected:connect(function(mouse)
mouse.Icon = “http://www.roblox.com/asset/?id=54019936”
mouse.Button1Down:connect(function()
if not used then
used = true
local chars = game.ReplicatedStorage.Characters:GetChildren()
local players = game.Players:GetChildren()
for i=1,#players do
if players[i].Character~=nil and players[i].Character:FindFirstChild(“Humanoid”)~=nil and players[i].Character.Humanoid:FindFirstChild(“CharName”)~=nil then
for n,char in ipairs(chars) do
if char.Name==players[i].Character.Humanoid.CharName.Value then
table.remove(chars,n)
break
end
end
end
end
applyChar(game.Players.LocalPlayer,chars[math.random(1,#chars)])
script.Parent:Remove()
end
end)
end)
.