If statement Runs when it is not supposed to

I made an if statement inside the touched event of a part, It gets your UserId using Players Service, And compares it to the Value Variable which is set to my UserId.
However when I touch the part It still goes through the If statement. I even tried to Print both Variables Which gave me the same exact Output. I have no Idea what could be wrong.

I put the part of code that i struggle with below

you have to reference the value as:

local Value = game.Workspace.Value.Value

for it to work (works for any kind of value in the explorer)

It did work. However what i uploaded here was an example code of what I struggled with, and I fixed my Issue with replacing the StringValue with IntValue. So Thanks For Mentioning about the string value

oh ok well I just wanted to add that this solution would work for any kind of value not just stringvalues.

why not just do game.CreatorId

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.