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 » Scripters
Home Search
 

Script still going wrong

Previous Thread :: Next Thread 
SlimeMan22 is not online. SlimeMan22
Joined: 10 Mar 2012
Total Posts: 1210
04 Sep 2016 10:44 AM
I posted a question about a script not working earlier, and got some answers. I didn't completely understand the responses since I'm a new scripter. Bassically the script is supposed to change a text label to say "You are above the point" when your Y axis is below 1k studs, and your X and Z axis are between 0 and 500 studs. I put '(line)' where a line would have been, since the code isn't pasting over correctly, and at another point I had to put what a line of the code did in brackets because roblox thought the code wasn't appropriate. It's probably going to be really hard to read this, but if someone can help I would really appreciate it. Here's the code:

AtX = false (line) AtY = false (line) AtZ = false

script.Parent.Parent.Parent.Parent.Character.Torso.Changed:connect(function()
if(script.Parent.Parent.Parent.Parent.Character.Torso.Position.X < 500) and (script.Parent.Parent.Parent.Parent.Character.Torso.Position.X > 0) then
AtX = true
elseif (script.Parent.Parent.Parent.Parent.Character.Torso.Position.Y < 1000) and (script.Parent.Parent.Parent.Parent.Character.Torso.Position.Y > 0) then
AtY = true
elseif (script.Parent.Parent.Parent.Parent.Character.Torso.Position.Z < 500) and (script.Parent.Parent.Parent.Parent.Character.Torso.Position.Z > 0) then (line) [this changed the t e x t box] "at the island" (line) else end
Report Abuse
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
04 Sep 2016 11:18 AM
"script.Parent.Parent.Parent.Parent.Character.Torso.Changed:connect"

The problem lies here "Torso.Changed", moving on to the script your using the Torso's positioning.

Try use 'Torso.Position.Changed'
Report Abuse
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
04 Sep 2016 11:19 AM
Cos the "Torso.Changed" didn't make any sense at all.
Report Abuse
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
04 Sep 2016 11:20 AM
Hope this helped
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
04 Sep 2016 11:26 AM
because you have more parents than you can count

if this is a local script you can literally do

game.Players.LocalPlayer

Report Abuse
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
04 Sep 2016 11:27 AM
^
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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