Still have questions? Join our Discord server and get real time help.
Log in to vote

Why doesn´t the Increment Value get updated to one?

Asked by 11 months ago

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.

    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

I will remember to accept a good answer.

1 answer

Log in to vote
Answered by
Derzett 51
11 months ago

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!


Answer this question