Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Can you please help with my survival horror game?

Asked by 10 months ago

So I'm making a survival horror game and I need it so it can somehow know if a player has escaped to a player being killed. The script checking if there are no players in a team is below. Please help!

if #teamplayers == 0 then
    for _, v in pairs(game.Players:GetChildren()) do
        if v.TeamColor == BrickColor.new("Carnation pink") then
            v.leaderstats.Cash.Value = v.leaderstats.Cash.Value + 100
            v.CharacterAppearanceId = v.UserId
            v.TeamColor = BrickColor.new("White")
            v.CharacterAppearanceId = v.UserId
            print("eeeee")
            game.ReplicatedStorage.ESallyhasWon:FireAllClients()
            wait(3)

            script.CountDown.Value = 0
        end
    end
end
0
any output errors? Lunaify 66 — 10mo
0
There's nothing wrong with the script. I just need ideas on how it would work. What I mean is I need the script to somehow know between a player dying and a player escaping. NiroTurtle 83 — 10mo
0
So if you're wanting to separate players in any way, I'd would either use a set of tables to store the different playerstates or use CollectionService to tag players. ForeverBrown 355 — 10mo
0
Thanks! I'll definitely try using tables. NiroTurtle 83 — 10mo
View all comments (2 more)
0
Well, is it possible for tables to be in modulescripts so multiple scripts can access it? NiroTurtle 83 — 10mo
0
Maybe you could make a title related to the script, not the game though. Dylan011444 59 — 10mo

Answer this question