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: What is wrong with this script

Previous Thread :: Next Thread 
vikingboy is not online. vikingboy
Joined: 25 Apr 2008
Total Posts: 1219
31 Mar 2012 01:56 AM
Script is placed inside a textlabel. WHat is supposed to happen is if "g1" is in a certain position specified in the script, then a button will become visible. If not, then another button will be visible.

script:

g1 = game.Workspace.g1
If g1.Position = 913.3, 781.5, 187.5 then
script.Parent.Parent.Close.Visible = true
else
script.Parent.Parent.Open.Visible = true
script.Parent.Parent.Close.Visible = false
Report Abuse
Lucrum is not online. Lucrum
Joined: 27 Mar 2012
Total Posts: 25
31 Mar 2012 02:37 AM
g1 = game.Workspace.g1

if g1.Position = Vector3.new(913.3, 781.5, 187.5) then
script.Parent.Parent.Close.Visible = true
else
script.Parent.Parent.Open.Visible = true
script.Parent.Parent.Close.Visible = false
end
Report Abuse
qwerty1806 is not online. qwerty1806
Joined: 20 Sep 2008
Total Posts: 737
31 Mar 2012 03:55 AM
Almost, but you missed out an '=':

g1 = game.Workspace.g1

if g1.Position == Vector3.new(913.3, 781.5, 187.5) then
script.Parent.Parent.Close.Visible = true
else
script.Parent.Parent.Open.Visible = true
script.Parent.Parent.Close.Visible = false
end
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