RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make me fly if i press "e" and i can toggle on/off."
-- local script local player = game:GetService("Players").LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local flying = false local function toggleFly() if flying then flying = false humanoid.PlatformStand = false humanoid.Jump = true else flying = true humanoid.PlatformStand = true end end local function onKeyPress(input) if input.KeyCode == Enum.KeyCode.E then toggleFly() end end game:GetService("UserInputService").InputBegan:Connect(onKeyPress)