|
| 17 Jun 2014 08:31 PM |
function onTouched(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then local player = hit.Parent:FindFirstChild("Humanoid").Parent
player.if blood.Visible = true wait(100) player.Torso:Remove()
end end
script.Parent.Touched:connect(onTouched)
when you touch this brick it makes a gui named if blood visible then wait 100seconds and kill you |
|
|
| Report Abuse |
|
|
EliteTCer
|
  |
| Joined: 17 Dec 2008 |
| Total Posts: 5174 |
|
|
| 17 Jun 2014 08:32 PM |
function onTouched(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then local player = hit.Parent:FindFirstChild("Humanoid").Parent
player["if blood"].Visible = true wait(100) player.Torso:Remove()
end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
EliteTCer
|
  |
| Joined: 17 Dec 2008 |
| Total Posts: 5174 |
|
|
| 17 Jun 2014 08:33 PM |
| The gui would be in PlayerGui though right? |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2014 09:14 PM |
| it's parent will be screengui and it will all be inside of player gui |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2014 09:17 PM |
22:16:22.282 - if blood is not a valid member of Model 22:16:22.282 - Script 'Workspace.Part.Script1', Line 5 22:16:22.283 - Stack End 22:16:22.285 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
EliteTCer
|
  |
| Joined: 17 Dec 2008 |
| Total Posts: 5174 |
|
|
| 17 Jun 2014 09:29 PM |
| The if blood gui has to be in startergui but make it not visible |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2014 10:01 PM |
function onTouched(h) local p = game.Players:GetPlayerFromCharacter(h.Parent) if p~=nil then repeat wait() until p.PlayerGui p.PlayerGui["if blood"].Visible = true wait(100) h.Parent.Torso:Destroy() end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2014 10:31 PM |
23:31:17.732 - if blood is not a valid member of PlayerGui 23:31:17.733 - Script 'Workspace.Part.Script', Line 5 23:31:17.734 - Stack End 23:31:17.834 - if blood is not a valid member of PlayerGui 23:31:17.835 - Script 'Workspace.Part.Script', Line 5 23:31:17.836 - Stack End
i'm so confused at this point |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Jun 2014 11:41 AM |
function onTouched(h) if h.Parent local p = game.Players:GetPlayerFromCharacter(h.Parent) if p then if p:FindFirstChild("PlayerGui") then p.PlayerGui.ScreenGui["if blood"].Visible = true wait(100) h.Parent.Torso:Destroy() else--Cannot find PlayerGui, filtering is enabled (I think) then you need to use a --remote event. -- end end end end script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
|
| 18 Jun 2014 02:52 PM |
| Wait i thought it's required to say hit and not just h? |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2014 03:12 PM |
It can be anything, for it's a variable. Usually I use part as the variable. |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2014 03:20 PM |
well if you dont mind i have another problem
http://www.roblox.com/Forum/ShowPost.aspx?PostID=137318212 |
|
|
| Report Abuse |
|
|