so i tried making a script and
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message == “setvalue random” then
game.ReplicatedStorage.avalue.Value = math.random(1,100)
if game.ReplicatedStorage.avalue.Value == 30 then
game.Workspace.Brick.smile.Texture = “rbxassetid://9642367027”
end
end
end)
end)
it doesn’t work for some reason the value went to 30 it only happens rarely