(SOLVED)Part is not following the player

local script:

local uis = game:GetService("UserInputService")
local rem =  game:GetService("ReplicatedStorage").RemoteEvent
local debounce = false
local plr = game.Players.LocalPlayer
uis.InputBegan:Connect(function(input,istyping)
	
	if istyping then return end
	if input.KeyCode == Enum.KeyCode.E then
		rem:FireServer()
	end
end)

normal script:

local rem = game:GetService("ReplicatedStorage").RemoteEvent
local REM2 = game:GetService("ReplicatedStorage").remotevent2

rem.OnServerEvent:Connect(function(plr)
	local char = plr.Character or plr.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
	local part = game:GetService("ReplicatedStorage").Part
	local clone = part:Clone()
	local bp = Instance.new("BodyPosition",clone)
	
	bp.MaxForce =  Vector3.new(44000,44000,44000)
	
	clone.Parent = head
	while task.wait() do
		bp.Position = head.Position * Vector3.new(0,2,0)
	end

end)

i shoudlve used cframe instead of position so now it will be :

bp.Position = head.CFrame * Vector3.new(0,2,0)
1 Like