Hi i have a telekinesis power and i have a problem with player character
When i print the character it’s print my name but when i put Character.Head it’s give me error message
" ServerScriptService.Telekinesis:11: attempt to perform arithmetic (sub) on nil and Vector3 - Server"
here is my script:
local RE = game:GetService("ReplicatedStorage")
local TelekinesisEvent = RE.TelekinesisMouseMove
local BodyPosition = Instance.new("BodyPosition")
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)