of     1   

Ueskay
#182581151Friday, January 29, 2016 12:13 AM GMT

local plr = game.Players.LocalPlayer local char = game.Workspace:WaitForChild(plr.Name) local torso = char:WaitForChild("Torso") local larm = char:WaitForChild("Left Arm") local rarm = char:WaitForChild("Right Arm") local lleg = char:WaitForChild("Left Leg") local rleg = char:WaitForChild("Right Leg") local head = char:WaitForChild("Head") local shirt = char:WaitForChild("Shirt") local pants = char:WaitForChild("Pants") local hum = char:WaitForChild("Humanoid") print(script.Name .. " Loaded...") while true do torso.BrickColor = BrickColor.new("White") larm.BrickColor = BrickColor.new("White") rarm.BrickColor = BrickColor.new("White") lleg.BrickColor = BrickColor.new("White") rleg.BrickColor = BrickColor.new("White") head.BrickColor = BrickColor.new("White") torso.Material = 'Slate' larm.Material = 'Slate' rarm.Material = 'Slate' lleg.Material = 'Slate' rleg.Material = 'Slate' head.Material = 'Slate' head.Mesh:Remove() head.face:Remove() shirt:Remove() pants:Remove() end local a = Instance.new('Sound') a.Parnt = game.Soundscape a.SoundId = 'http://www.roblox.com/asset?id=238895410' a:Play() a.Looped = true while true do if hum.Health == 80 then larm:Remove() else if hum.Health == 60 then rarm:Remove() else if hum.Health == 40 then lleg:remove() else if hum.Health == 20 then rleg:remove() end end end end end The while true do is the problem, that bit doesnt work when the player is injured and there are issues at line 30, aka head.mesh:remove()
petro180
#182581403Friday, January 29, 2016 12:17 AM GMT

firstly, if the players isn't wearing a shirt or pants the code wont execute secondly, you cant do health == 60 because your health will never be exactly 60, its some ridiculous decimal, you have to do math.floor(health) == 60 and that will execute whenever your health is rounded to exactly 60
Ueskay
#182581843Friday, January 29, 2016 12:23 AM GMT

I Can't have shirt and pants on the player as i am transforming them into a rock golem type thing, those dont wear clothing.. and sometimes when the script launches the skin changes from white to the players original skin, i cant have that... and i dont know much about math, only the math.random and its use, i cant do anything about the health thats why i need assistance
Ueskay
#182582418Friday, January 29, 2016 12:33 AM GMT

Edit:: local plr = game.Players.LocalPlayer local char = game.Workspace:WaitForChild(plr.Name) local torso = char:WaitForChild("Torso") local larm = char:WaitForChild("Left Arm") local rarm = char:WaitForChild("Right Arm") local lleg = char:WaitForChild("Left Leg") local rleg = char:WaitForChild("Right Leg") local head = char:WaitForChild("Head") local shirt = char:WaitForChild("Shirt") local pants = char:WaitForChild("Pants") local hum = char:WaitForChild("Humanoid") print(script.Name .. " Loaded...") while true do torso.BrickColor = BrickColor.new("White") larm.BrickColor = BrickColor.new("White") rarm.BrickColor = BrickColor.new("White") lleg.BrickColor = BrickColor.new("White") rleg.BrickColor = BrickColor.new("White") head.BrickColor = BrickColor.new("White") torso.Material = 'Slate' larm.Material = 'Slate' rarm.Material = 'Slate' lleg.Material = 'Slate' rleg.Material = 'Slate' head.Material = 'Slate' head.Mesh:Remove() head.face:Remove() shirt.ShirtTemplate = 0 pants.PantsTemplate = 0 end local a = Instance.new('Sound') a.Parent= game.Soundscape a.SoundId = 'http://www.roblox.com/asset?id=238895410' a:Play() a.Looped = true while true do if hum.math.floor(hum.Health) == 80 then larm:Remove() else if hum.math.floor(hum.Health) == 60 then rarm:Remove() else if hum.math.floor(hum.Health) == 40 then lleg:remove() else if hum.math.floor(hum.Health) == 20 then rleg:remove() end end end end end however the rock doesnt apply to the body with clothing and and the while true do STILL doesnt work
petro180
#182588886Friday, January 29, 2016 2:05 AM GMT

> hum.math.floor(hum.Health) should be > math.floor(hum.Health) also, when you write a post here, it would benefit us all if you stated that you had minimal scripting knowledge as our reposes would vary in content. you only need 1 while true do loop, in your case you have 2. I'd remove the first one. also add a wait() after the while true do or it will crash the game. u also misunderstood what i meant by the shirt u have char:WaitForChild("Shirt"), but if i when on my profile and removed my shirt, then i wouldnt spawn ingame with a shirt, and the code would stop at tht line cus it's waiting for a shirt to appear in the character which in this case will never happen and the code after this point wont ever execute.

    of     1