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
 

Broken Script

Previous Thread :: Next Thread 
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
21 Jun 2014 07:45 PM
Im trying to make it so that if something touches a brick then it gets the player from a vehicleseat and gives them player points. Output says weld is nil because there is no time for anybody to sit down yet. How else would I label weld?



db = false


function onTouch(points)
if db or Workspace.VehicleSeat.SeatWeld == nil then return end
player = game.Players:GetPlayerFromCharacter(Workspace.VehicleSeat.SeatWeld.Parent)
db = true
Game:GetService("PointsService"):AwardPoints(player.userId, 5)
db = false
end

script.Parent.Touched:connect(onTouch)
Report Abuse
Toughlizard1345 is not online. Toughlizard1345
Joined: 13 Jul 2010
Total Posts: 1077
21 Jun 2014 07:48 PM
*edit*

It breaks when the brick is touched because SeatWeld "is not a valid member" instead of ending like it should
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
21 Jun 2014 08:20 PM
What you mean when the brick is touched? When a player touches it? Or like it touches the car?
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