|
| 16 Nov 2014 02:03 AM |
Ive looked at this multible times over and over again, it just comes up nil.
playertoc is a character from a PlayerTouched event
local playerpl = game.Players:GetPlayerFromCharacter(playertoc) |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Nov 2014 02:18 AM |
It doesen't matter what the name is, it just says that it is a nil value, but it DOES have a value!
script.Parent.Touched:connect(function(p) if p.Parent.Humanoid~= nil then local playerpl = game.Players:GetPlayerFromCharacter(p) --Value. local shopgui = game.Lighting.ShopGui:Clone() shopgui.Parent = playerpl.PlayerGui --Says that the value doesn't exist end end) |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 02:53 AM |
local playerpl = game.Players:GetPlayerFromCharacter(p.Parent) ?
or either
local human = p.Parent:FindFirstChild("Humanoid") if p.Parent.Humanoid ~= nil then |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 02:53 AM |
i mean
if human ~= nil then |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 03:13 AM |
| why dont you do game.Players[hit.Parent.Name]? |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 03:17 AM |
| local playerpl = game.Players:GetPlayerFromCharacter(p.Parent)* |
|
|
| Report Abuse |
|
|