yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 25 Jan 2015 02:48 AM |
| I removed the player's character. But how would I give it back in the situation inside my script? |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 25 Jan 2015 02:51 AM |
--this situation
local enabled = false
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil and enabled == false) then part.Parent:remove() -- remove the player end end script.Parent.Touched:connect(onTouch)
|
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 25 Jan 2015 02:55 AM |
local db = false
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and not db then db = true hit.Parent:Destroy() -- dont use :remove() wait(3) player:LoadCharacter() db = false end end) |
|
|
| Report Abuse |
|
|