Hey, I’m making a simulator game and I want to figure out how to make a tool not collide with part?
The tool looks like this:
I’m using the handle to detect when it touches a part so it can give money to the player.
I have a area name system that uses parts and I want it so the handle (or the tool) doesn’t collide with it even if it’s CanCollide option is off.
Also I have an unlock area system which also uses parts. How can I make it so the airplane tool doesnt collide with that? Thanks for any help.
Script in paper airplane: (If it helps)
local tool = script.Parent
local plr
local ClonedTool = game.ReplicatedStorage.PaperAirplane:Clone()
local Player = game:GetService("Players")
local Handle = script.Parent.Handle
tool.Bounce.OnServerEvent:Connect(function(player, event)
plr = player
print(player)
local mouse = player:GetMouse()
local ball = tool.Handle
tool.Parent = workspace
ball.CFrame = tool.Handle.CFrame
ball.CFrame = CFrame.new(ball.Position, event)
local BV = Instance.new("BodyVelocity", ball);
BV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BV.Velocity = ball.CFrame.lookVector * 50 -- how fast it throws
wait(.1)
tool.Handle.BodyVelocity:Destroy()
local Camera = workspace.Camera
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = tool
end)
local isTouched=false
script.Parent.Handle.Touched:Connect(function(hit)
print("hit")
if hit.Parent:FindFirstChild("Part") then
print("Is part")
wait(2)
script.Parent:Destroy()
local ClonedTool = game.ReplicatedStorage.PaperAirplane:Clone()
ClonedTool.Parent = plr.Backpack
print("Destroyed")
plr.leaderstats.Coins.Value += 20
game.Workspace.Coins:Play()
end
end)
script.Parent.Handle.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Part") then
hit.CanCollide = false
wait(2)
hit.CanCollide = true
end
end)
PhysicsService can do it
loop through every children in the plane and make the collision group a part called “100robuxarea”, make the part collide with the same group too.
What he needs is very easy, you set the paper airplane’s CollisionGroup to a custom one, he sets the Model‘s CollisionGroup as the same and make the CollisionGroup not collide with itself but collide with the normal CollisionGroup
Yes, but in the Studio, if you got to the Model Tab, here’s a thing under Advanced if I’m not wrong where you can configure CollisionGroups, I created a CollisionGroup from there and I had the option to choose with ehich CollisionGroup it would collide
Try going in the Model Tab, under Advanced, there should be a button that says: CollisionGroups
Click there and you should be able to configure everything