Players.milesm2k.PlayerGui.Penalty.Diagram.Execute.StopCursors:8: bad argument #2 to '?' (UDim expected, got number)
It says that line 8 is the problem, but I'm not sure why it doesn't see Cursor1.Position.X as a number.
function Click()
if script.Parent.Parent.Parent.Cursor1InPlay.Value == true then
script.Parent.Parent.Parent.Cursor1InPlay.Value = false
script.Parent.Parent.Parent.Cursor2InPlay.Value = true
elseif script.Parent.Parent.Parent.Cursor2InPlay.Value == true then
script.Parent.Parent.Parent.Cursor2InPlay.Value = false
local Cursor1Pos = script.Parent.Parent.Cursor1.Position.X
local x = 24.125 - (0.100520833 * (Cursor1Pos-7))
workspace.PKLauncher.Orientation = Vector3.new(0,x,90)
end
end
script.Parent.MouseButton1Click:connect(Click)
