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: Help

Previous Thread :: Next Thread 
stoleObamasKFC is not online. stoleObamasKFC
Joined: 28 Dec 2013
Total Posts: 98
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
stoleObamasKFC is not online. stoleObamasKFC
Joined: 28 Dec 2013
Total Posts: 98
31 Dec 2013 11:22 AM
Oh, how can I somehow define "player"? Sorry, I'm new to the language.
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
31 Dec 2013 11:23 AM
player = game.Players:GetPlayerFromCharacter(hit.parent)
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
31 Dec 2013 11:24 AM
GetPlayerFromCharacter
Report Abuse
stoleObamasKFC is not online. stoleObamasKFC
Joined: 28 Dec 2013
Total Posts: 98
31 Dec 2013 11:46 AM
Works great, thanks.
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