I working on press E teleportsys or i have problems with press E !!!
✓ ANSWER ACCEPTED
Can i make press E teleport sys ?
1 answer
✓ Accepted answer
If I understand correctly, you want the character to teleport when you press E?
local userInputService = game:GetService("UserInputService")
local mouse = game.Players.LocalPlayer:GetMouse()
local character = game.Players.LocalPlayer.Character
userInputService.InputBegan:Connect(function(key) --Input detected!
if key.KeyCode == Enum.KeyCode.E then --Checks if we pressed "e"
character.HumanoidRootPart.CFrame = mouse.Hit --teleports the character to the mouse's position
end
end)
For more information on keycodes and stuff, check out this article
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
THX !!!