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

[unanswered] What is wrong with this script? It works all the way to the final line?

Asked by 5 years ago
Edited 5 years ago

Here is my script

wait(5)
local randomPlayer = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]

 randomPlayer.TeamColor = BrickColor.new("Really black")

 randomPlayer.character.LowerTorso.CFrame = CFrame.new(workspace.KillerSpawn.Position)
 randomPlayer.character.Head.face.Texture = 'http://www.roblox.com/asset/?id=2383072347'
 randomPlayer.character.Head.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LeftFoot.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LeftHand.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LeftLowerArm.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LeftLowerLeg.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LeftUpperArm.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LeftUpperLeg.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.LowerTorso.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.RightFoot.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.RightHand.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.RightLowerArm.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.RightLowerLeg.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.RightUpperArm.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.RightUpperLeg.BrickColor = BrickColor.new("Really black")
 randomPlayer.character.UpperTorso.BrickColor = BrickColor.new("Really black")

 randomPlayer.character.Humanoid:RemoveAccessories()

 randomPlayer.character.Shirt:destroy()
 randomPlayer.character.Pants:destroy()

 randomPlayer.character.Humanoid:EquipTool(game.ServerStorage.Katana)

it works all the way to the final line. it equips the tool, but the tool doesnt do anything, it only puts it in the randomPlayer's hand. outside of studio, it doesnt work at all. can anyone help me out?

0
Is this done via localscript or just a normal script? Also do you mean that it only works inside studio and not in-game via the Roblox site? lazycoolboy500 597 — 5y
0
normal script, and yes i do TrixitesWasTaken 13 — 5y
0
this is a fe problem INOOBE_YT 387 — 5y
0
i want to know how to fix it not what type of problem it is TrixitesWasTaken 13 — 5y
View all comments (2 more)
0
:destroy() is deprecated. Use :Destroy() instead. green271 635 — 5y
0
I've had problems like this in the past. For me, game.ServerStorage is impossible to get stuff out of, normal script or not. Try freezing the tool in workspace when it's out of the map, and then make the random player equip an unfrozen copy KicksForTricks56 36 — 5y

Answer this question