|
| 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 |
|
| |
| |
|
| 18 Feb 2012 02:48 PM |
| I tried it with just Y but it said that Y couldn't be defined |
|
|
| Report Abuse |
|
lordyoman
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 426 |
|
|
| 18 Feb 2012 02:49 PM |
| You need Vector3.new I think... |
|
|
| Report Abuse |
|
|
| 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 |
|
|
| 18 Feb 2012 03:01 PM |
| It says "Y can not be assigned to" |
|
|
| Report Abuse |
|