Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.