I am making a jetpack to attach on my player and I have scripted this
local player = game.Players.LocalPlayer repeat wait() until player.Character.Humanoid local humanoid = player.Character.Humanoid local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key) if string.byte(key) == 48 then workspace.Jetpack.Fire2.Jetpack1 = Enabled workspace.Jetpack.Fire2.Jetpack2 = Enabled end end)
Every time I press Shift the particles don't activate and I get this error in the Output - ****Jetpack1 is not a valid member of Part
Any help is appreciated! :)
Please, please, PLEASE use UIS - User Input Service! Key Down Is Deprecated!
local uis = game:GetService("UserInputService") uis.InputBegan ............... -- you do the rest
you might
want to add a Waitforchild()
infront of "dot jetpack1"
you definetly want to add 'WaitForChild()` infront of LocalPlayer
please be be sure to quit using key down and please use code block! it is the blue "lua" Circle you see when typing your request for help
hope this helps AltNature [Lua / Blenderer]#2828