Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont this work? I have a script changing the House Level value to 1

Why won't this script work? I have a script setting the House Level value to 1, but It says its value isnt 1

player.leaderstats.HouseLevel.Changed:Connect(function()
	if player.leaderstats.HouseLevel == 1 then
		print("Level1")
	end
end)

1 comment

0

Nevermind I found the Fix, I wasn't finding the HouseLevel.Value I was finding the HouseLevel.

1 answer

-- if using normal script the "LocalPlayer" be a "Player", but also if using local script the "Player" be a "LocalPlayer".

Local player = game.Players.LocalPlayer
Local leaderstats = game.Players.LocalPlayer.leaderstats
Local HouseLevel = game.Players.LocalPlayer.leaderstats.HouseLevel.Value

player.leaderstats.HouseLevel.Changed(function()
    if player.leaderstats.HouseLevel = 1 then
        print("Level1")
    end
end)

1 comment

0

Sorry if things go wrong :(

This discussion is preserved as it was. New answers, comments, and votes are closed.