Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- mouse = player:GetMouse()
- function onKeyPress(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Enum.KeyCode.E then
- local pos = mouse.Hit+Vector3.new(0,2.5,0)
- pos = CFrame.new(pos.X,pos.Y,pos.Z)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = pos
- elseif inputObject.KeyCode == Enum.KeyCode.Q then
- T = mouse.Target
- if T.CanCollide == false then
- T.CanCollide = true
- print(T.CanCollide)
- else
- T.CanCollide = false
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement