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: Output Glitching

Previous Thread :: Next Thread 
Tribes78 is not online. Tribes78
Joined: 01 Sep 2006
Total Posts: 1311
28 Jul 2011 04:25 PM
So I'm writing a script and this line is having trouble with the Output.

if board.SkateboardPlatform.InAir == true then

The output says this;

Players.Tribes78.Backpack.Fliptricks.SpinsQE:22: '=' expected near 'if'

I require assistance.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
28 Jul 2011 04:26 PM
Whole script please?
Report Abuse
Tribes78 is not online. Tribes78
Joined: 01 Sep 2006
Total Posts: 1311
28 Jul 2011 04:27 PM
Okay..

turn = 0
function onKeyDown(key)
board = script.Parent.Parent.Parent.Character:FindFirstChild("Board")
if board ~= nil then
if board.SkateboardPlatform.InAir == true and key == "q" then
turn = -1.5
end
if board.SkateboardPlatform.InAir == true and key == "e" then
turn = 1.5
end
end
end

function s(mouse)
mouse.KeyDown:connect(onKeyDown)
end

while true do
wait(0.1)
script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro
if script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.InAir == true then
script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000)
script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0)
end
end

script.Parent.Selected:connect(s)
Report Abuse
Tribes78 is not online. Tribes78
Joined: 01 Sep 2006
Total Posts: 1311
28 Jul 2011 04:27 PM
The posting glitched. Some of the lines are skewed.
Report Abuse
Tribes78 is not online. Tribes78
Joined: 01 Sep 2006
Total Posts: 1311
28 Jul 2011 04:32 PM
I was messing with the script some more trying to fix it, and it's looking like an output problem, or a problem with the game more so than a problem with my script (Which I'm sure is full of glitches).

I know this because I got rid of the if function in the while true do function, and the output is still saying that that line of text requires an '=' near the first word of the line (which is script... what)

You can go ahead and ignore this, I'm going to rewrite the script and see what happens.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
28 Jul 2011 04:33 PM
turn = 0
function onKeyDown(key)
board = script.Parent.Parent.Parent.Character:FindFirstChild("Board")
if board ~= nil then
if board.SkateboardPlatform.InAir == true and key == "q" then
turn = -1.5
end
if board.SkateboardPlatform.InAir == true and key == "e" then
turn = 1.5
end
end
end

function s(mouse)
mouse.KeyDown:connect(onKeyDown)
end

while true do
wait(0.1)
script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro
if script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.InAir == true then
script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000)
script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0)
end
end

script.Parent.Selected:connect(s)
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
28 Jul 2011 04:33 PM
That's the same thing, I was trying to fix it, nothing changed I was looking at it.
Sorry!
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
28 Jul 2011 04:35 PM
Why is there an end after if, then it continues without a function line?
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
28 Jul 2011 04:36 PM
What is InAir?
I'm not much of a scripter according to Scriptars, but I'll do my best.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
28 Jul 2011 04:38 PM
What is turn?
Report Abuse
Kalandri is not online. Kalandri
Joined: 25 Sep 2010
Total Posts: 26
28 Jul 2011 04:42 PM
turn = 0
function onKeyDown(key)
board = script.Parent.Parent.Parent.Character:findFirstChild("Board")
if board ~= nil then
if board.SkateboardPlatform.InAir == true and key == "q" then
turn = -1.5
end
if board.SkateboardPlatform.InAir == true and key == "e" then
turn = 1.5
end
end
end

function s(mouse)
mouse.KeyDown:connect(onKeyDown)
end

while true do
wait(0.1)
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro
if script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.InAir == true then
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000)
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0)
end
end

script.Parent.Selected:connect(s)

How about know?
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
28 Jul 2011 04:43 PM
turn = 0
function onKeyDown(key)
board = script.Parent.Parent.Parent.Character:findFirstChild("Board")
if board ~= nil then
if board.SkateboardPlatform.InAir == true and key == "q" then
turn = turn -1.5
end
if board.SkateboardPlatform.InAir == true and key == "e" then
turn = turn +1.5
end
end
end

function s(mouse)
mouse.KeyDown:connect(onKeyDown)
end

while true do
wait(0.1)
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro
if script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.InAir == true then
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000)
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0)
end
end

script.Parent.Selected:connect(s)

Report Abuse
smurf279 is not online. smurf279
Joined: 15 Mar 2010
Total Posts: 6871
28 Jul 2011 05:21 PM
turn = 0
function onKeyDown(key)
board = script.Parent.Parent.Parent.Character:findFirstChild("Board")
if board ~= nil then
if board.SkateboardPlatform.InAir == true and key == "q" then
turn = turn -1.5
elseif board.SkateboardPlatform.InAir == true and key == "e" then
turn = turn +1.5
end
end
end
mouse.KeyDown:connect(onKeyDown)


function s(mouse)

while true do
wait(0.1)
if script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.InAir == true then
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000)
script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0)
end
end
end

script.Parent.Selected:connect(s)

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