|
| 27 Aug 2013 04:23 PM |
This is my first block touching script in a really long time so don't judge XD
16:20:00.707 - Workspace.Base.Script:8: attempt to index global 'hit' (a nil value) 16:20:00.710 - Script 'Workspace.Base.Script', Line 8 16:20:00.710 - stack end 16:20:00.711 - Disconnected event because of exception 16:20:05.627 - PlayerGui is not a valid member of Part 16:20:05.627 - Script 'Workspace.Base.Script', Line 4 16:20:05.628 - stack end 16:20:05.628 - Disconnected event because of exception
That's the error output up there ^^^
script.Parent.Touched:connect(function(hit) --Does this call the block that was hit or what hit it? local hum = hit.Parent:FindFirstChild("Humanoid") if hum then hit.PlayerGui.Elevator.Frame.Visible = true end end) script.Parent.TouchEnded:connect(function() local hum = hit.Parent:FindFirstChild("Humanoid") if hum then hit.PlayerGui.Elevator.Frame.Visible = false end end) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2013 04:35 PM |
"hit" is the character, not the player.. ~The Internet~ |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2013 04:39 PM |
| Oh... how do I connect a hit to the player instead :3 |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2013 04:40 PM |
game.Players:GetPlayerFromCharacter(hit).Whatever
~The Internet~ |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2013 04:41 PM |
Oops, I meant hit.Parent
~The Internet~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Aug 2013 04:48 PM |
Well actually Im getting a new error twice
16:47:13.478 - The function GetPlayerFromCharacter is not a member of "Model" |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2013 04:51 PM |
| nevermind, I used a . instead of a : |
|
|
| Report Abuse |
|
|