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 : how to check if something is available using script

Previous Thread :: Next Thread 
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 10:24 AM
how to check if something is available using script
for example
car = game.Workspace.car


if "the car is available" then
print "THERE IS A CAR!!!!!"

this is a simple example

so i can use that for

seating = game.Workspace.car.VehicleSeat.SeatWeld

if "seating is available in the game" then
print "you are RIDING A CAR!!!!!"

tell me if there is something wrong and how to write if something is available i will try to stay online
Report Abuse
NumeriusValerius is not online. NumeriusValerius
Joined: 28 Dec 2009
Total Posts: 3089
20 Apr 2014 10:26 AM
http://wiki.roblox.com/index.php/Conditional_statement
Report Abuse
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 10:28 AM
I will read it and try it
THANKS for replying quickly
Report Abuse
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 10:39 AM
"NumeriusValerius"

it doesn't have what i want to know
i want to know if something in the game is available

---->NOT<----

(= == ~= > < >= <= etc)
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
20 Apr 2014 11:04 AM
car = game.Workspace:FindFirstChild("car")
wait()
if car then
print("THERE IS A CAR!!!!!11!1oneone")
end

~The herp lerped a derp~
Report Abuse
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 11:08 AM
Let me try it :D
Report Abuse
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 11:25 AM
So i did this

BasePlate = game.Workspace.BasePlate("BasePlate")
wait()
if BasePlate then
print("THERE IS A BASEPLATE")
end


and it said

> BasePlate = game.Workspace.BasePlate("BasePlate")
wait()
if BasePlate then
print("THERE IS A BASEPLATE")
end
20:23:26.055 - BasePlate = game.Workspace.BasePlate("BasePlate")
wait()
if:1: attempt to call field 'BasePlate' (a userdata value)
20:23:26.057 - Script 'BasePlate = game.Workspace.BasePlate("BasePlate")
wait()
if', Line 1
20:23:26.058 - stack end
Report Abuse
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 11:26 AM
WHATS Wrong D':
Report Abuse
Mrprocom is not online. Mrprocom
Joined: 27 Mar 2014
Total Posts: 27
20 Apr 2014 11:38 AM
I need help i am a new person in roblox so i want to create my first game

() ()
0
/---\
| v |
\___/
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