|
| 31 Dec 2013 11:22 AM |
-- VehicleSeats and BaseParts --
I'm trying to change the text of a surface gui when a player enters a car. ------
local car = script.Parent
function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then car.Parent = hit.Parent wait(.3) game.Workspace.Display.SurfaceGui.Owner.Text = "Owner:"player.Name"." end end
script.Parent.Touched:connect(onTouched)
------
No output, No reaction It says owner: and nothing else. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 11:22 AM |
| Oh, how can I somehow define "player"? Sorry, I'm new to the language. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 31 Dec 2013 11:23 AM |
| player = game.Players:GetPlayerFromCharacter(hit.parent) |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
| |
|
| |
|