I am trying to use UIS to determine if a Highlighter is in the position of a certain UDim2. If it is then do something. If it is in a different position lets say 0,0,0,30 then do something else. Heres my script that errors.
UserInputService.InputBegan:Connect(function(key,proc)
if key.KeyCode == Enum.KeyCode.Return then
if Tabs.PLAYER.Visible == true and SelectorBar.Position == UDim2.new(Positions.Player) then
if CD then
No.Visible = false
Yes.Visible = true
print("0")
else
No.Visible = true
Yes.Visible = false
print("1")
end
CD = not CD;
end
end
end)
UserInputService.InputBegan:Connect(function(key,proc)
if key.KeyCode == Enum.KeyCode.Return then
if Tabs.PLAYER.Visible == true and SelectorBar.Position == UDim2.new(Positions.Player2) then
Player:BreakJoints()
end
end
end)