So, I wanted to make a FPS Zombie shooter game. I was going to make a part that if you touched, Spawns a boss. I'm VERY new to Roblox coding but either nothing happens, or its spawns multiple. Here is the script I most recently tried out: local part = script.Parent
part.Touched:Connect(game.ReplicatedStorage.MechaSpider)
This is not as complicated as you may think it is. What you want to do is simply just add a few lines of code to this. Be sure to put the mecha spider into ReplicatedStorage
.
script.Parent.Touched:connect(function(otherPart) -- Detects when the part is touched if otherPart.Parent:FindFirstChild("Humanoid") ~= nil then -- Detects of the thing that touched the object is a humanoid game.ReplicatedStorage.MechaSpider.Parent = workspace -- Puts the boss into workspace end end)