I am making a game. Right now I have it so that whenever they press space fire comes out of the 3d model I welded to the character, but the player kinda gets stuck in the baseplate. Can anyone help? This is my script (not seeing any errors in output)
`local Players = game:GetService(“Players”)
local player = Players.LocalPlayer
local character = player.Character
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, player)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Space then
character.UpperTorso.Jetpack.PE.Enabled = true
while true do
wait(.5)
character:SetPrimaryPartCFrame(CFrame.new(0, 3, 0))
end
end
end
end)
UIS.InputEnded:Connect(function(input, player)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Space then
character.UpperTorso.Jetpack.PE.Enabled = false
end
end
end)
Is this your entire ‘jetpack’ script? Is it not a tool, is there no other script? If not, you have some work to do, you haven’t made a jetpack, you’ve made an accessory.
Okay well you should search for flying scripts and see if you can find something if you don’t know how to script it. I think a lot of them use the legacy body movers to accomplish this.