Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help with a script that takes a part that touches another part to a specific position?

Asked by 5 years ago

Hello, I would like to ask how I can make a script that if a part touches another part the part will be sent to a specific position This is my script but it's not working local Ball = game.Workspace.Ball

script.Parent.Touched:Connect(function(hit)

if hit.Parent:

Ball.Position = (3.121, 1.264, 9.106)

end

end)

1 answer

Log in to vote
-1
Answered by 5 years ago
Edited 5 years ago
local Ball = game.Workspace.Ball



    script.Parent.Touched:Connect(function(hit)



    if hit.Parent:FindFirstChild("Ball") then--if ball touches this part then



    Ball.CFrame = CFrame.new (3.121, 1.264, 9.106)--ball will get this position



    end



    end)
Ad

Answer this question