Hi i have a telekinesis power and want drag player with mouse
i have already a script but i do’t know why it’s dosen’t work
here is my script:
local RE = game:GetService("ReplicatedStorage")
local TelekinesisEvent = RE.TelekinesisMouseMove
local BodyPosition = Instance.new("BodyPosition")
BodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyPosition.P = 150
local stepped
local RunService = game:GetService("RunService")
TelekinesisEvent.OnServerEvent:Connect(function(client, Character, mouse, target)
stepped = RunService.Heartbeat:Connect(function()
BodyPosition.Position = client.Character.Head.Position + (mouse - client.Character.Head.Position).Unit * 20
end)
end)
RE.TelekinesisBP.OnServerEvent:Connect(function(Client, target)
BodyPosition.Parent = target.HumanoidRootPart
end)