uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
|
| 13 Feb 2014 09:12 AM |
function hit(part) local plr = part.Parent:FindFirstChild("Humanoid") if (plr ~= nil) then p = plr.Parent.Name game.Players.p.PlayerGui.GUINAMEHERE.Frame.Visible = true end end script.Parent.Touched:connect(hit) --Put the script in the part.
|
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
|
| 13 Feb 2014 03:26 PM |
| You have to post the full code for us to understand what you're trying to accomplish, please post the full code. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2014 03:28 PM |
One of the errors "findFirstChild("")
It's FindFirstChild("") |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2014 03:32 PM |
I'm still not exactly sure what the OP is trying to do. As my code would have worked for just making a GUI visible. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2014 04:34 PM |
plaor = game.Players:GetPlayerFromCharacter(hit)
Simple enough! |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 04:50 PM |
These stupid people need to stop trying to fix things that aren't broken. FindFirstChild and findFirstChild work the same, just like Workspace, game.Workspace, and workspace.
player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then --stuff end |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 05:53 PM |
Yes it is lmfao.
if player then is the same as saying if player ~= nil then, it's just more advanced skiddy. Don't be hating unless you tried it bud :) |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 13 Feb 2014 05:56 PM |
local partYOUwant = game.Workspace["Part Name"]; partYOUwant.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent); --code on the player variable; end end) |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 05:56 PM |
Also, OP
http://wiki.roblox.com/index.php?title=GetPlayerFromCharacter_(Method)
So goml fgt |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 05:57 PM |
| another thing, OP, you never declared size so that script wouldn't do a thing. |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 05:58 PM |
script.Parent.Touched:connect(function(c) pcall(function() local plr = game.Players:GetPlayerFromCharacter(c) --stuff end) end)
Now there's no need to check for player. |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 06:00 PM |
| I'll explain it once you explain how my scripting is "fake" skid ;) |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 06:01 PM |
| You can't explain how my scripting is fake = you're a fking skid now go away and stop refusing my help |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 06:03 PM |
Right because that makes sense.
You even told war "that doesn't look right" Because you didn't know what GetPlayerFromCharacter is.
inb4 "youre fake" inb4 "you didnt help so you dont know lua"
OP jump off a bridge |
|
|
| Report Abuse |
|
|
dodleman
|
  |
| Joined: 22 Dec 2007 |
| Total Posts: 1118 |
|
|
| 13 Feb 2014 06:04 PM |
| Also, if explaining how a basic (barely recursive) for loop means I know lua, then everyone should know lua by now. |
|
|
| Report Abuse |
|
|
uomevip
|
  |
| Joined: 31 Jul 2011 |
| Total Posts: 1695 |
|
| |
|