hello!
Ive being scripting a LocalScript to first destroy the LocalPlayer's shirts,pants and hats and then copy one from a model to the LocalPlayer but it dosent work!
heres the code :
local uselesshirt = game.Players.LocalPlayer.Character.Shirt uselesshirt:Destroy() local uselesspants = game.Players.LocalPlayer.Character.Pants uselesspants:Destory() local shirt = game.Workspace.swat_model_1.Shirt:Clone() shirt.Parent = game.Players.LocalPlayer.Character local pants = game.Workspace.swat_model_1.Pants:Clone() pants.Parent = game.Players.LocalPlayer.Character local uselesshats = game.StarterGui.Clothing.Player:GetChildren("Hat") uselesshats:Destroy() local helmet = game.Workspace.swat_model_1.helmet:Clone() helmet.Parent = game.Players.LocalPlayer.Character local vest = game.Workspace.swat_model_1.vest:Clone() vest.Parent = game.Players.LocalPlayer.Character
I couldn't figure what was wrong here,thanks!
In Pants You Spelled Destroy Wrong!
local uselesshirt = game.Players.LocalPlayer.Character.Shirt uselesshirt:Destroy() local uselesspants = game.Players.LocalPlayer.Character.Pants uselesspants:Destroy() local shirt = game.Workspace.swat_model_1.Shirt:Clone() shirt.Parent = game.Players.LocalPlayer.Character local pants = game.Workspace.swat_model_1.Pants:Clone() pants.Parent = game.Players.LocalPlayer.Character local uselesshats = game.StarterGui.Clothing.Player:GetChildren("Hat") uselesshats:Destroy() local helmet = game.Workspace.swat_model_1.helmet:Clone() helmet.Parent = game.Players.LocalPlayer.Character local vest = game.Workspace.swat_model_1.vest:Clone() vest.Parent = game.Players.LocalPlayer.Character