Question about parts with CanCollide set to false

I have a part in my game that covers the spawn area and it has a script inside it with a Touched event. Before the script was added to the part, I was able to spawn inside the part. Now that a script is inside the part, I spawn on the roof. My question is, can I fix this so I spawn inside the part regardless of there being a script inside?

Video:

2 Likes

Can you show images, because I am quite confused, I believe this may be in #help-and-feedback:scripting-support instead because the script caused the spawn to elevate to the roof instead of that block.

The script does not alter the part’s position in any way. I wasn’t sure where to post this because it’s both scripting and building in a way. My problem is that without a script inside the part, I spawn inside but when there is a script inside I spawn on the roof. I know why it’s caused, I just wasn’t sure if there was a known workaround or if this is a common problem.

oh I have no clue how to answer that now lol, yeah I guess y ou could attach this to scripting too for help there. Mainly post your script, because image references are the best.

I just added a video to the original post, sorry for the late response.

Can I see the script? The video’s kind of small.

local parent = script.Parent

parent.Touched:Connect(function(part)
	if part.Parent:FindFirstChild("Humanoid") then
		if part == part.Parent.PrimaryPart then
			local forceField = Instance.new("ForceField", part.Parent)
		end
	end
end)

parent.TouchEnded:Connect(function(part)
	if part.Parent:FindFirstChild("Humanoid") then
		if part == part.Parent.PrimaryPart then
			part.Parent:FindFirstChild("ForceField"):Destroy()
		end
	end
end)

The script doesn’t have anything to do with it apparently…
If the spawn covers the entire spawn area, keep in mind players spawn in the closest available area above it.

But without the script inside, I spawn inside as shown in the video. I’m pretty sure the issue is the Touched event inside the script. Touched events add TouchInterest to the part and that may be my issue.

Edit: after testing, this is not the issue so I actually have no clue what’s wrong.

Can I see the properties of the SpawnLocation? Are there multiple? Is Neutral unchecked on the other if there is?

There are 4 SpawnLocations and neutral is selected on all 4.

Are all the locations inside of the container?

If you mean the part with the script inside then yes.

If Neutral is checked, you randomly spawn at that location if you don’t have a team.
Are all the locations with Neutral checked inside the container?


I’m not exactly sure what you’re asking, but here is a screenshot of the game. I circled the spawns and they’re all inside the invisible part.

Ok, then that’s not the problem…
If any were outside the container, you would randomly spawn outside.