Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] [?] My script isn't even running! No errors. Need assistance!

Asked by 6 years ago
Edited 6 years ago

Notes before we continue;

  1. This is a ServerScript inside ServerScriptService

  2. The script isn't Disabled

  3. There are no errors in the Output

  4. The game doesn't even run

Output;

10:52:11.105 - Red V.S Blue; Tower Defense [BETA TESTING] @ 15 Aug 2017 10:52 was auto-saved Loading Cutscene Editor... Cutscene Editor Loaded

That's it, nothing else.

  1. I tried to print it doesn't even print.

Here's the script;

local teamForFirstGuy
local BlueSpawn = game.Workspace:WaitForChild('BlueTower').BlueSpawn
local RedSpawn = game.Workspace:WaitForChild('RedTower').RedSpawn
local AOP = game.ServerStorage:WaitForChild('AmountOfPlayers')
local BlueEffect = game.Lighting:WaitForChild('Blur')
local W = 0.07

game.Players.PlayerAdded:connect(function(plr)
    wait(1)
    AOP.Value = AOP.Value + 1

    local Stats = Instance.new('Model')
    Stats.Name = 'PlrStats'
    Stats.Parent = plr


    local Team = Instance.new("StringValue")
    Team.Name = "Team"

    if teamForFirstGuy then
        Team.Value = teamForFirstGuy == "Blue" and "Red" or "Blue"
    else
        Team.Value = math.random() < .5 and "Blue" or "Red"
        teamForFirstGuy = Team.Value

        Team.Parent = Stats

        plr.CharacterAdded:Connect(function(char)
            if Team.Value == 'Red' then
                wait()
                char:WaitForChild('HumanoidRootPart').CFrame = BlueSpawn.CFrame
            else
                wait()
                char:WaitForChild('HumanoidRootPart').CFrame = RedSpawn.CFrame
            end
        end)    
    end
end)

game.Players.PlayerAdded:Connect(function(plr)
    wait(1)
    local IntroText = plr.PlayerGui:WaitForChild('MainGui').LoadingLabel
    local BattleFrame = plr.PlayerGui:WaitForChild('MainGui').BattleFrame

    if AOP.Value == 1 then
        BlueEffect.Size = 24
        IntroText.Visible = true
        for i = 1, 0, 0.1 do
            IntroText.TextStrokeTransparency = i
            IntroText.TextTransparency = i
            wait(W)
            for i = 0, 1, -0.1 do
                IntroText.TextStrokeTransparency = i
                IntroText.TextTransparency = i
                if AOP.Value == 2 then
                    BlueEffect.Size = 0
                    wait(2)
                    IntroText.Text = 'Ready?'
                    wait(2)
                    IntroText.Text = 'Set?'
                    wait(2)
                    IntroText.Text = 'FIGHT!'
                    wait(2)
                    IntroText.Visible = false
                    wait(W)
                    BattleFrame.Visible = true
                end
            end
        end
    end
end)

I'm not sure what I did wrong, maybe I put a loop inside a loop and made the game glitch or something. But nothing happens when I join. It worked before but after fixing a few mistakes it just doesn't work at all.

Note:

I added a loop to the fading effects (that's what I changed)

Any support, help assistance, feedback is appreciated! Thank you for reading!

1 answer

Log in to vote
-1
Answered by 6 years ago

have you tested it in game????

0
Use comments plz and now it's fixed sorry BlackOrange3343 2676 — 6y
Ad

Answer this question