How do i fix cursor inverted position? [closed]
I am making a 2008 simulator and i've made a local part that is like green cursor block.
I tried this script:
01 | local localplayerr = game.Players.LocalPlayer |
03 | local character = localplayerr.Character or localplayerr.CharacterAdded:wait() |
05 | local bin = Instance.new( "Message" ) |
09 | local platform = Instance.new( "Part" ) |
10 | platform.Name = "CursorSelection" |
11 | platform.BrickColor = BrickColor.new( "Lime green" ) |
12 | platform.Material = Enum.Material.Plastic |
13 | platform.BottomSurface = Enum.SurfaceType.Smooth |
14 | platform.TopSurface = Enum.SurfaceType.Smooth |
15 | platform.FrontSurface = Enum.SurfaceType.Smooth |
16 | platform.LeftSurface = Enum.SurfaceType.Smooth |
17 | platform.CanCollide = false |
18 | platform.Anchored = true |
19 | platform.Size = Vector 3. new( 2 , 0.2 , 2 ) |
21 | local msh = Instance.new( "CylinderMesh" ) |
28 | function SetCursorPosition() |
31 | platform.Position = Vector 3. new(localplayerr:GetMouse().X / 32 , localplayerr:GetMouse().Y / 32 , character.Torso.Position.Z * 32 ) |
35 | Spawn(SetCursorPosition) |
The problem is at SetCursorPosition platform.Position...
The block is getting inverted position of cursor!
Please help
Thanks
~marcoantoniosantos3