You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Im making a funny maze game with a orange ball that i named " Joe "
if he receive 500 damage he turns into phase 2 that is when he goes sad
this is phase 1 joe
this is what he’s supposed to become when on phase 2
What is the issue? Include screenshots / videos if possible!
Soo like, my script dont seems to detect when he’s 500 health, and thats a problem
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I dont searched on the devforum since i mostly would not find any help for this.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Bob = script.Parent -- his name was bob before
local health = script.Parent.Humanoid.Health
local BobClone = game.ServerStorage.Joe
local BobHeart = Bob.Humanoid
local face = script.Parent.Model.FHead.face
local sadface = script.Parent.Model.FHead.sad
while wait() do
if health <=500 then
script.Parent.sadness:Play() -- this is a animation that is supposed to play when he get 500 health
BobHeart.WalkSpeed = 0
script.Parent.Model.LeftHand.BrickColor = BrickColor.new("Really red")
script.Parent.Model.RightHand.BrickColor = BrickColor.new("Really red")
script.Parent.Model.FHead.BrickColor = BrickColor.new("Really red")
face.Transparency = 1
sadface.Transparency = 0
wait(4)
BobHeart.WalkSpeed = 25
end
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
local Bob = script.Parent -- his name was bob before
local humanoid = script.Parent.Humanoid -- removed '.Health'
local BobClone = game.ServerStorage.Joe
local face = script.Parent.Model.FHead.face
local sadface = script.Parent.Model.FHead.sad
humanoid.HealthChanged:Connect(function()
if humanoid.Health <= 500 then
script.Parent.sadness:Play() -- this is a animation that is supposed to play when he get 500 health
humanoid.WalkSpeed = 0
script.Parent.Model.LeftHand.BrickColor = BrickColor.new("Really red")
script.Parent.Model.RightHand.BrickColor = BrickColor.new("Really red")
script.Parent.Model.FHead.BrickColor = BrickColor.new("Really red")
face.Transparency = 1
sadface.Transparency = 0
wait(4)
humanoid.WalkSpeed = 25
end
end)
Joe sucessfully got sad, but not on a smooth way, the part that changes his appearance works but the one with animation didnt, needed to remove the animation part to make it work, used BabyNinjaTime edit, joe also didnt got 0 speed and after 4 seconds got 25 speed.