Dominical
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 1303 |
|
|
| 14 Apr 2014 08:56 PM |
| Where you can't take off hats or you die when you take off your hats? |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2014 08:58 PM |
Kill the player when he presses that "=" key on the keyboard perhaps? I don't know, I'm tired. |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2014 08:58 PM |
while wait() do for I,v in pairs(game.Players:children()) do char = v.Character or v.CharacterAdded:wait() for _,h in pairs(char:children()) do if h:IsA("Hat") then h.Handle.Parent = char h:Destroy() end end end end
--now no one can remove hats :P(will have to weld it tho) |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2014 08:59 PM |
Game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) Character.ChildRemoved:connect(function(Item) if Item:IsA("Hat") then Item.Parent = Character end end) end) end) |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2014 08:59 PM |
while wait() do for I,v in pairs(game.Players:children()) do char = v.Character or v.CharacterAdded:wait() for _,h in pairs(char:children()) do if h:IsA("Hat") then h.Handle.Parent = char h:Destroy() end end end end
--now no one can remove hats :P(will have to weld it tho)
or,you could
Workspace.ChildAdded:connect(function(c) if c:IsA("Hat") then wait() c:Destroy() end end) |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2014 09:00 PM |
@not
dang,thats a better idea..didn't even think of that XD
good job lol |
|
|
| Report Abuse |
|
|
Dominical
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 1303 |
|
|
| 14 Apr 2014 09:15 PM |
Thanks guys, I came up with something that I like:
plr = game.Players.LocalPlayer plrmouse = plr:GetMouse()
function onKeyDown(key) if string.byte(key) == 61 then plr.Character:BreakJoints() end end
plrmouse.KeyDown:connect(onKeyDown) |
|
|
| Report Abuse |
|
|