You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Hi, I would like to be able to lift other players or parts not anchored in the air like a telekinesis power -
What is the issue? Include screenshots / videos if possible!
I tried to follow this tutorial Dragging objects with the mouse
but the part bounce all the time
2022-07-21 13-46-46 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried to reproduce this tutorial Dragging objects with the mouse
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
In a local script
mouse.Button1Down:connect(function()
if mouse.Target ~= nil and mouse.Target.Locked == false then
if mouse.Target.Anchored == false then
if mouse.Target:FindFirstChild("CanBeDragged") then
target = mouse.Target
mouse.TargetFilter = target
SetNetworkOwner:FireServer(target)
down = true
end
end
end
end)
mouse.Move:Connect(function()
if down == true and target ~= nil then
target.Position = Character.Head.Position + (mouse.Hit.Position - Character.Head.Position).Unit * 20
end
end)
mouse.Button1Up:connect(function()
down = false
mouse.TargetFilter = nil
target = nil
end)
In a server script
local SetNetworkOwner = game.ReplicatedStorage.SetNetworkOwner
SetNetworkOwner.OnServerEvent:Connect(function(client, part)
part:SetNetworkOwner(client)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.