Everything's going wrong in my game

Idk what to do anymore, I have made an dev forum already about a part of this situation I’m in rn, which is this:

So I’ve been coding when 0 players are on the baseplate, the baseplate will disappear. But if at least one player are on the baseplate, the baseplate will reappear and spawn in zombies. I thought after the forum I posted earlier everything was solved, no, now, the baseplate won’t even appear and the zombies are also not spawning in as well. I tried to wrap the checking the player int value (where it stores the amount of player on the baseplate) with a while true event, but this leads to my roblox studio crashing and also not working. Can somebody please help me with this problem? I’ve been stuck on this for around 2 hours now. Thank you for reading.

The checking players:
a

The zombies spawning:

Adding 1 to the int value (player) for the baseplate to appear:

Taking away 1 to the int value for the baseplate to either still appear or disappear when no one’s on it:

1 Like

Did you look up your problems on google?

I tried to but nothing really popped up in google

Is there anything useful on YouTube?

Use Zone Plus it will detect when a Player enters something (Touches) It’s better than TouchedEvents

For more details, add a part above the Baseplate make sure Cancollide is false, Cantouch is true and Transparency 1, When the Players enters the zone add a value when the Player leaves the Zone remove the Player
Example
Make sure too get your Zone Plus module and add it in ReplicatedStorage and your invisible Part (for the baseplate) name is BaseplateInvisible
After that add a Local script and Paste this code

local Player = game.Players.LocalPlayer
local Zone = require(game:GetService("ReplicatedStorage").Zone)
local BasePlateInvisible = game.workspace.BaseplateInvisible
local zone = Zone.new(BasePlateInvisible)
zone.playerEntered:Connect(function() --  the Player entered the baseplate
-- add a value
end)
zone.playerExited:Connect(function() -- the Player left the baseplate
-- remove a value
end)

I just checked the zone plus out and I don’t really get the module scripts, like there are Janitor and Enum and other confusing scripts. When you say for me to put the zone plus module to my replicated storage, do you mean by the zone plus reference or all of the module scripts.

You don’t have to do anything to it Just place it in replicated storage

Zone Plus.

I’ve also provided you some Code check it out!
You will have to make it so it removes the Value and adds it back,etc.

this
you mean this?

Yep, Keep it in replicated storage (also make sure the Zone plus code is there)

After that make a huge Platform on the baseplate and after that follow these steps

the baseplate you still doesn’t appear :frowning:

Can I see your code? if you are using my code I already said you will have to add more changes…

make sure the baseplate is anchored to.

Make sure the Invisible zone is anchored and Can you also add a print when the Player enters? if it prints then there is a problem with your values.

i just tested it out and it seems that outputs doesn’t show when i enter the zone, and also the invisiblezone is anchored

That’s really weird is the CanTouch to true?
Make sure you are actually touching it.
try making it transparency to 0 if you enter it (quick test incase you aren’t touching it)

CanTouch is indeed set on true

and also i just done a quick test and it I am touching the zone, perhaps maybe i put the zone’s module script wrong, here take a look on where i put it:

Try this script (Add a server script in ServerScriptService)

local Players = game.Players
local PlayersValue  = game.Workspace.ZombieSwordSawn.players
local InvisibleZone = game.Workspace.InvisibleZone
local Zone = require(game.ReplicatedStorage.Zone)
local zone = Zone.new(InvisibleZone)

zone.playerEntered:Connect(function()
PlayersValue.Value += 1
end)
zone.playerExited:Connect(function()
PlayersValue.Value -= 1
end)

Yes, I tested it and it works in my studio…