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: Not working script

Previous Thread :: Next Thread 
Rexauro is not online. Rexauro
Joined: 03 Mar 2008
Total Posts: 8864
07 Jan 2014 03:36 PM
1st PART


local max = script.Max.Changed
local min = script.Min.Changed
local hunger = script.Hunger
local Player = game.Players.LocalPlayer
local Charater = Player.Character

for i = hunger.Value, max.Value do
max.Value = (i - hunger.Value)
wait(.8)
end

while true do
script.Parent.Size.X.Offset = max.Value - hunger.Value
end

if max.Value < 0 then
hunger.Value = 0
for i = 1, Character.Humanoid.MaxHealth do
Character.Humanoid.Health = math.random(1, 25)
wait(.5)
if Character.Humanoid.Health < 0 then
Character:BreakJoints()
end
end
end




2ND PART



local max = script.Parent.HungerScript.Max

while true do
wait()
script.Parent.Size = UDim2.new(0, max.Value, 0.649999976, 0)
end





Can someone tell me why the bar isn't going down?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
07 Jan 2014 03:43 PM
Change

local max = script.Max.Changed
local min = script.Min.Changed


To

local max = script.Max:findFirstChild("Changed")
and the same for min
Report Abuse
Rexauro is not online. Rexauro
Joined: 03 Mar 2008
Total Posts: 8864
07 Jan 2014 03:52 PM
Didn't work.
Report Abuse
Rexauro is not online. Rexauro
Joined: 03 Mar 2008
Total Posts: 8864
07 Jan 2014 03:59 PM
B1.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
07 Jan 2014 04:15 PM
You can't have a while true do loop and expect it to go onto another part.
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