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?
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.
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.
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?