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: Weird Problem

Previous Thread :: Next Thread 
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
18 Feb 2012 02:43 PM
This is supposed to make a flag lower when it's based is touched. The output says
Workspace.Part1.Script:2: ')' expected near ',' so I don't know where it's talking about because I checked everything. Any help will be appreciated.
+-Fishy



function onTouched(hit)
if game.Workspace.Part2.Position == (-13, 56, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 51, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 51, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 46, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 46, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 41, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 41, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 36, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 36, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 31, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 31, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 26, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 26, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 21, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 21, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 16, 29.75)
end
wait(.5)
if game.Workspace.Part2.Position == (-13, 16, 29.75) then
game.Workspace.Part2.Position = Vector3.new(-13, 13, 29.75)
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
18 Feb 2012 02:47 PM
[ Content Deleted ]
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
18 Feb 2012 02:48 PM
[ Content Deleted ]
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
18 Feb 2012 02:48 PM
I tried it with just Y but it said that Y couldn't be defined
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
18 Feb 2012 02:49 PM
You need Vector3.new I think...
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
18 Feb 2012 02:58 PM
Here's the new one. And I have Vector3.new all over the place...



function onTouched(hit)
if game.Workspace.Part2.Position.Y == 56 then
game.Workspace.Part2.Position.Y = Vector3.new(51)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 51 then
game.Workspace.Part2.Position.Y = Vector3.new(46)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 46 then
game.Workspace.Part2.Position.Y = Vector3.new(41)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 41 then
game.Workspace.Part2.Position.Y = Vector3.new(36)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 36 then
game.Workspace.Part2.Position.Y = Vector3.new(31)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 31 then
game.Workspace.Part2.Position.Y = Vector3.new(26)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 26 then
game.Workspace.Part2.Position.Y = Vector3.new(21)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 21 then
game.Workspace.Part2.Position.Y = Vector3.new(16)
end
wait(.5)
if game.Workspace.Part2.Position.Y == 16 then
game.Workspace.Part2.Position.Y = Vector3.new(13)
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
18 Feb 2012 03:01 PM
It says "Y can not be assigned to"
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