wait(0.5) local char = script.Parent local oldval = game.ReplicatedStorage:FindFirstChild("TpVal"..char.Name) if oldval ~= nil then print("not nil") script.Parent.RestorePlrHomePos.Disabled = false wait(0.1) script.Parent.TpPosServerSync.Disabled = false wait() script.Disabled = true end if oldval == nil then print("nil") local tpval = Instance.new("Vector3Value") tpval.Name = "HomeTp:"..char.Name tpval.Parent = game.ReplicatedStorage script.Parent.TpPosServerSync.Disabled = false wait() script.Disabled = true end
here is my problem: this script first checks in replicatedstorage for a value with "TpVal (characters name)" if its not there it runs the bottom portion of the script, if it is there then it runs the upper portion. the problem is even if the value IS there it always returns nil rather than not nil.