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

I wrote a piece of code so it could you check if someone did the tutorial but it is not working?

Asked by
friso9 -3
1 year ago

So my script is not working but I get no errors. I probably just did something wrong with coding since I'm a beginner, thanks in advance.

The part is not changing color so it gets stuck somewhere.

thanks in advance

local dataStoreService = game:GetService("DataStoreService")
local experienceStore = dataStoreService:GetDataStore("PlayerExperience")
local findJoinBool = game:FindFirstChild("FirstJoin")


game.Players.PlayerAdded:Connect(function(player)
    local dataStoreFolder = Instance.new("Folder")
    dataStoreFolder.Parent = player
    dataStoreFolder.Name = "dataStoreFolder"
    if player.dataStoreFolder:FindFirstChild("FirstJoin") then
        print("Firstjoin is true, player plays without tutorial")
        game.Workspace.Testpart = BrickColor.new("Deep blue")



        if not player:FindFirstChild("FirstJoin") then

            local boolV = Instance.new("BoolValue")
            boolV.Parent = dataStoreFolder
            boolV.Name = "FirstJoinTutorial"
            boolV.Value = false
            local tutorialReady = Instance.new("BoolValue")
            tutorialReady.Name = "TutReady"
            tutorialReady.Parent = "dataStoreFolder"
            tutorialReady.Value = true
            print("FirstJoin created")
            game.Workspace.Testpart = BrickColor.new("Deep orange")

        end
    end


end)

0
Can you tell me a little more about It? imnotaguest1121 362 — 1y

Answer this question