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: Can You See Any Possible Problems With This Script?

Previous Thread :: Next Thread 
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
04 Aug 2012 01:59 PM
door = script.Parent

while true do
local h = door.Parent.Parent:FindFirstChild("Humanoid")--The Humanoid
if h~=nil and if door.ART.Value == 1 then
wait(1)
door.Parent.Parent.Humanoid.Jump = true
wait(4)
end
end


--[[It's inside the Handle of a hat.
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
04 Aug 2012 02:02 PM
door = script.Parent

while true do
local h = door.Parent.Parent:FindFirstChild("Humanoid")--The Humanoid
if h~=nil and door.ART.Value == 1 then --No need for 2 'if' statements
wait(1)
door.Parent.Parent.Humanoid.Jump = true
wait(4)
end
end

-Nick
Report Abuse
Mathfreak231 is not online. Mathfreak231
Joined: 21 Jun 2010
Total Posts: 5311
04 Aug 2012 02:03 PM
Is door.Parent.Parent.Humanoid.Jump a BoolValue?

You need to use .Value if you want to change it.

~This sig is false~
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
04 Aug 2012 02:08 PM
Thanks, Advor. :D
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
04 Aug 2012 02:14 PM
There's just one problem..

The game freezes when you take it off and change the ART value to 1.

Which is too bad, don't know how to end the script, otherwise.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
04 Aug 2012 02:20 PM
Change "while true do" to "while wait() do". It was crashing because when ART wasn't 1, it never reached a wait statement and so never slept.
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
04 Aug 2012 02:25 PM
Thanks, I'll try that. :)
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