i want to make it so that when a player touches the water the player gets damage but thats working. the thing thats not working is that i want it to not take damage if a value says so. but the value isint changing. here is the script:
local button = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local race = workspace.PlayerStats.Race.Value
button.Activated:Connect(function(player)
script.Parent.Visible = false
script.Parent.Parent.GloomWeavers.Visible = false
script.Parent.Parent.Emberkin.Visible = false
script.Parent.Parent.Luminities.Visible = false
workspace.Damage.Value += 2
hum.WalkSpeed += 5
race = "tidewalker"
end)
please respond.