generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: is this right?

Previous Thread :: Next Thread 
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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 is not online. 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 is not online. EliteTCer
Joined: 17 Dec 2008
Total Posts: 5174
17 Jun 2014 08:33 PM
The gui would be in PlayerGui though right?
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
17 Jun 2014 09:07 PM
ye
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
17 Jun 2014 09:14 PM
it's parent will be screengui and it will all be inside of player gui
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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 is not online. 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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
17 Jun 2014 09:38 PM
It is.
Report Abuse
DeSpizer27 is not online. DeSpizer27
Joined: 13 Jul 2012
Total Posts: 2679
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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
18 Jun 2014 11:30 AM
bump
Report Abuse
protectiveEBob is not online. protectiveEBob
Joined: 09 Jul 2012
Total Posts: 1297
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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
18 Jun 2014 02:52 PM
Wait i thought it's required to say hit and not just h?
Report Abuse
protectiveEBob is not online. protectiveEBob
Joined: 09 Jul 2012
Total Posts: 1297
18 Jun 2014 03:12 PM
It can be anything, for it's a variable.
Usually I use part as the variable.
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image