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: missing end?

Previous Thread :: Next Thread 
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
11 Aug 2012 03:56 AM
Theres a missing end or a then? I cant find any!
Heres the script:


plr = game.Players.LocalPlayer
char = plr.Character
guis = plr.PlayerGui
scripts = script.Parent
self = script
sprinting = false
running = false
crouch = false
prone = false
visible = 4
audible = 0


repeat wait()
until player

function on_walk(speed)
if speed > 0 then
moving = true
else
moving = false
end
end

function return_values()
if not crouch and prone and sprinting then
if moving then
audible = 3
visible = 4
end
elseif crouch and moving then
audible = 2
visible = 3
elseif prone and moving then
audible = 1
visible = 1
elseif sprinting then
audible = 5
visible = 5
elseif crouch and moving==false then
audible = 0
visible = 2
elseif prone and moving==false then
audible = 0
visible = 0
else
audible = 0
visible = 4
end
return audible
return visible
end

while true do
local a,v = return_values()
script.Parent.Values.Audible.Value = a
script.Parent.Values.Visible.Value = v
wait(0.5)
end

char.Humanoid.Running:connect(on_walk)
Report Abuse
ThatThar is not online. ThatThar
Joined: 09 Jul 2012
Total Posts: 794
11 Aug 2012 03:58 AM
plr = game.Players.LocalPlayer
char = plr.Character
guis = plr.PlayerGui
scripts = script.Parent
self = script
sprinting = false
running = false
crouch = false
prone = false
visible = 4
audible = 0


repeat wait()
until player

function on_walk(speed)
if speed > 0 then
moving = true
else
moving = false
end
end

function return_values()
if not crouch and prone and sprinting then
if moving then
audible = 3
visible = 4
end
elseif crouch and moving then
audible = 2
visible = 3
elseif prone and moving then
audible = 1
visible = 1
elseif sprinting then
audible = 5
visible = 5
elseif crouch and moving==false then
audible = 0
visible = 2
elseif prone and moving==false then
audible = 0
visible = 0
else
audible = 0
visible = 4
end
return audible
return visible
end
end

while true do
local a,v = return_values()
script.Parent.Values.Audible.Value = a
script.Parent.Values.Visible.Value = v
wait(0.5)
end
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
11 Aug 2012 03:59 AM
You never ended off

function return_values()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
11 Aug 2012 03:59 AM
nvm

floodcheck
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
11 Aug 2012 04:00 AM
ThatThar's script fixed it
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
11 Aug 2012 04:03 AM
Still same error
Report Abuse
ThatThar is not online. ThatThar
Joined: 09 Jul 2012
Total Posts: 794
11 Aug 2012 04:05 AM
What exactly does the output say?
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
11 Aug 2012 04:05 AM
Hmmm...
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
11 Aug 2012 04:08 AM
end expected to close function near return
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
11 Aug 2012 04:09 AM
Ok, I fixed errors, but now it doesnt work..

plr = game.Players.LocalPlayer
char = plr.Character
guis = plr.PlayerGui
scripts = script.Parent
self = script
sprinting = false
running = false
crouch = false
prone = false


repeat wait()
until player

function on_walk(speed)
if speed > 0 then
moving = true
else
moving = false
end
end

function return_values()
local audible = 0
local visible = 0
if not prone or crouch then
if not moving then
audible = 3
visible = 4
end
elseif crouch and moving then
audible = 2
visible = 3
elseif prone and moving then
audible = 1
visible = 1
elseif sprinting then
audible = 5
visible = 5
elseif crouch and moving==false then
audible = 0
visible = 2
elseif prone and moving==false then
audible = 0
visible = 0
else
audible = 0
visible = 4
end
return audible
return visible
end

while true do
local a,v = return_values()
script.Parent.Values.Audible.Value = a
script.Parent.Values.Visible.Value = v
wait(0.5)
end
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
11 Aug 2012 04:19 AM
Is this in a localscript, since you're using LocalPlayer?
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
11 Aug 2012 04:44 AM
yes, it certainly is.
Report Abuse
TehEpicFaic is not online. TehEpicFaic
Joined: 09 Apr 2010
Total Posts: 298
11 Aug 2012 06:29 AM
It'd be a lot more helpful if you gave us an output. If you have none, place "print"s among the script to see where it stops working.
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