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

How can i check if a part is collided with another part?

Asked by
CjayPlyz 643 Moderation Voter
5 years ago
local Part = game:GetService("ReplicatedStorage"):WaitForChild("Part")
local RemoteEvent = script.Parent.RemoteEvent

local function onServerEvent (Player, Target, TargetSurface)
local Clone = Part:Clone()
Clone.Anchored = true
Clone.Position = Target.Position + Vector3.FromNormalId(TargetSurface)*4
Clone.Parent = workspace
end

RemoteEvent.OnServerEvent:Connect(onServerEvent)

How do i check if the clone is collided with a part?

2 answers

Log in to vote
0
Answered by
CjayPlyz 643 Moderation Voter
5 years ago

Sorry for the trouble, I found an answer. It's GetTouchingParts()

0
GetTouchingParts not work with non-colliding parts B_arocena 55 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

You can use part.Touched() and then check to see if the touching part is what you're looking for.

Answer this question