View difference between Paste ID: aH7iTXeP and UCREqWGe
SHOW: | | - or go back to the newest paste.
1-
player = game.Players.LocalPlayer
1+
local player = game:GetService('Players').LocalPlayer
2-
mouse = player:GetMouse()
2+
local mouse = player:GetMouse()
3-
function onKeyPress(inputObject, gameProcessedEvent)
3+
local Disk = Instance.new("Part")
4-
	if inputObject.KeyCode == Enum.KeyCode.Q then
4+
Disk.Parent = game.workspace.Terrain
5-
		T = mouse.Target
5+
Disk.Name = "Walk Disk"
6-
	if T.CanCollide == false then
6+
game.Players.LocalPlayer:GetMouse().KeyDown:connect(function()
7-
		T.CanCollide = true
7+
	local Pos = Vector2.new(mouse.X, mouse.Y, mouse.Z)
8-
	else
8+
		Disk.Position = Pos
9-
		T.CanCollide = false  
9+
			print(Pos)
10-
		end
10+
		wait(.1)
11-
	end
11+
end)