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

if then is ignoring condition, any solution?

Asked by 3 years ago

I am currently making a keycard door. I have a string value called LevelValue in the player's character. The door works as intended, however the keycard reader does not. I first check if the Hit is the right arm of the character, then see if the door is already being used. After that we got the checking the level of the player:

if Hit.Parent.Values.LevelValue.Value == "Level 0" then
    --Door code
end

However, when I edit the value through the explorer and properties into anything, even gibberish, the door still opens. Does anyone know any solution to fix this?

1 answer

Log in to vote
0
Answered by
Necro_las 412 Moderation Voter
3 years ago

When you edit the value, you are probably editin only by the client. Try going to the serverside and editing there, there is a button on studio that says "Current Client" or "Current Server"

Ad

Answer this question