In my local script found in the PlayerGui how do I affect the humanoid, I want hurt it yet I think it is read only with local scripts.
local player = game.Players.LocalPlayer local Stats = player:WaitForChild("leaderstats") local Temp = Stats:WaitForChild("TEMPERATURE") local character = player.Character if not character or not character.Parent then character = player.CharacterAdded:wait() end local human = character:findFirstChild("Humanoid")
This is only part of my script but for some reason with my whole script everything works but the damaging Humanoid and the ouput gives me no reason.
Hope someone can asnwer this question.
local player = game.Players.LocalPlayer local Stats = player:WaitForChild("leaderstats") local Temp = Stats:WaitForChild("TEMPERATURE") local character = player.Character if not character or not character.Parent then character = player.CharacterAdded:wait() end local human = character:findFirstChild("Humanoid") --[[ I guess that your script is about your character losing health when reaching a certain temperature, so I will make a script for that ]]-- temp = "" -- if you want your temperature changing put something here or whatever... damage = 0.1 -- Insert the damage you will deal to the player maxtemp = 0 -- Insert your maximum temperature here mintemp = 0 -- Insert your minimum temperature here time = 0.1 -- Insert time between damage while temp >= maxtemp or temp<= mintemp do human.Health = human.Health - damage wait(time) end