I need a certain value to rise when the player presses the part. I am assigning this value through another script and it doesn´t work. The value I am talking about is the player.Hidden.Increment.Value
. The script below is a server script while the script assigning the value is a local script.
script.Parent.ClickDetector.MouseClick:Connect(function(player) player.Hidden.Hazard.Value = player.Hidden.Hazard.Value + 1 + player.Hidden.Increment.Value print(player.Hidden.Hazard.Value + player.Hidden.Increment.Value) script.Parent.Transparency = script.Parent.Transparency + 0.1 if script.Parent.Transparency > 1 then script.Parent.ClickDetector.MaxActivationDistance = 0 script.Parent.CanCollide = false end end)
I will remember to accept a good answer.
Is the increment value set to 1? Also you should use player.Hidden.Hazard.Value + 1 * player.Hidden.Increment.Value not +. I'm sure this would work fine!