So I am making a script that parents a group of parts to workspace every 5 seconds, here's my code;

local active = script.Parent.active
local donutfolder = game.ServerStorage.donuts
local donutcode = script.Parent.donutcode

while true do
    if active.Value then
        if donutcode.Value == 1 then --> This line of code is breaking it which results in the else below not working.
            print("peter 'allah' griffin")
        else
            warn('inactive11!!!!1!')
        end 
    end
wait(5)
end

Read code comments How do I fix this so the else statement actually works?

3 comments

0

Whats the errormessage?

0

try a pcall

0

There's no error message and how do I do a pcall