I'm making a script where if the player presses a key it would fire a shot from it's head. It does execute the script however it does not go in the player's direction and whenever I jump I get flung off.
(I know this script is causing the problem since I disabled this one for testing and I didn't get flung)
Here is my script:
elseif input.KeyCode == Enum.KeyCode.B and playerTeam == game.Teams.Zombies then local bloat = Instance.new("Part") bloat.Shape = ("Ball") bloat.Parent = character:WaitForChild("HumanoidRootPart") bloat.Velocity = character.HumanoidRootPart.CFrame.LookVector * 100 print(bloat.Position) --prints (0, 0, 0) everytime end
u might have to insert a VectorForce + the bloat.Shape = Enum.PartType.Ball
then u need to do in the vectorforce: create a new attachment, set it to attachment0 then do:
Attachment.Position = Ball.Position
attachment1 has to be the players humanoidrootpart so:
OtherAttach.Position = game.Players.LocalPlayer.Character.Head.Position