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

Command not displaying total hours?

When *;hours * is ran, the value says 0 but I clearly have more than 0 hours. Help is appreciated, thanks!

local DatastoreService = game:GetService("DataStoreService")

local player = game.Players.LocalPlayer
local hoursValue= Instance.new("NumberValue", player)

player.Chatted:Connect(function(msg)
			if msg == ";hours" then 
				
				        wait(0.1)
				
						game.StarterGui:SetCore('ChatMakeSystemMessage', {
		            	                        Text = "You have " .. hoursValue.Value .. " Total hours";
							Color = Color3.fromRGB(76, 255, 0);
							Font = Enum.Font.SourceSansLight;
							TextSize = 20;
						})	
        end

end)

1 answer

This

local hoursValue= Instance.new("NumberValue", player)

should be

local hoursValue = Instance.new("NumberValue", player)

1 comment

0

that's not fixing my problem tho

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