Hi, Recently i make telekinesis power, it work on dummy but not with player i don’t know why and it dosen’t give me any error in the output
here is my script:
if mouse.Target ~= nil and mouse.Target.Locked == false then
target = mouse.Target.Parent
print(target)
mouse.TargetFilter = target
SetNetworkOwner:FireServer(target)
RE.Telekinesis:FireServer(target, true)
down = true
end
mouse.Move:Connect(function()
if down == true and target ~= nil then
BodyPosition.Parent = target
stepped = RunService.Heartbeat:Connect(function()
BodyPosition.Position = Character.Head.Position + (mouse.Hit.Position - Character.Head.Position).Unit * 20
end)
end
end)
Print give me “Player1” but he don’t move and when i test with a dummy it’s work
Qariter
(Mari)
July 27, 2022, 11:00am
#2
Just move the part of Mouse.Move function to a server RemoteEvent. Players aren’t dummies, they are controllable dummies with their own rules.
Sorry but i don’t understand what do u mean
Like every time i move my mouse i fire remote event?
Qariter
(Mari)
July 27, 2022, 11:03am
#5
Exactly.
Just send a request to the server from the client going “hey, I want to move this character to there because i am currently using my telekensis” for your Mouse.Move part.
I’m pretty sure a loop would be better here.
but won’t that send too much information to the server?
Qariter
(Mari)
July 27, 2022, 11:05am
#7
That’s why I recall using a loop instead. There is no way to move some other player on your client without asking the server to do it for you.
I just change target to target.HumanoidRootPart it’s work in local script for all player beceause i change network owner to client