RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a code that spawns a part in front of the player whenever the e button is pressed"
-- local script local player = game.Players.LocalPlayer local part = Instance.new("Part") game:GetService("UserInputService").InputBegan:Connect(function(inputObject) if inputObject.KeyCode == Enum.KeyCode.E then part.Parent = workspace part.Position = player.Character.HumanoidRootPart.Position + (player.Character.HumanoidRootPart.CFrame.lookVector * 5) end end)