Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

local script that platformstands player when u have 20 hp how do i make it work?

Asked by
Yarb0b 0
3 years ago

im making a local script that platformstands player when u have 20 hp but i dont know how to make it work

script.Parent.Humanoid.HealthChanged:Connect(function()
    if script.Parent.Humanoid.Health <= 20 then
        script.Parent.Humanoid.PlatformStand = true
    else
        script.Parent.Humanoid.PlatformStand = false


        Instance.new("Decal", script.Parent["Left Leg"])
        script.Parent["Left Leg"].Decal.Texture = "rbxassetid://508050906"
        script.Parent["Left Leg"].Decal.Face = Region3int16

        Instance.new("Decal", script.Parent.Head)
        script.Parent.Head.Decal.Texture = "rbxassetid://176678128"
        script.Parent.Head.Decal.Face = "Back"
    end
end)

this is local script its in StarterCharacterscripts

Answer this question