I have no clue what this means, so I need help. Code is provided below
local IncreaseMultiplier = game.ReplicatedStorage.IncreaseMultiplier
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AnnouncementText = game.StarterGui.MainUI.AnnouncementText
local OldMulti = game.ServerStorage.StarterValues.PreviousMultiplier
local CurrentMulti = game.ServerStorage.StarterValues.Multiplier
local function IncreaseMulti(player)
OldMulti.Value = CurrentMulti.Value
wait(0.1)
CurrentMulti.Value = CurrentMulti.Value * math.random(0.72,5)
AnnouncementText.BackgroundColor = BrickColor.new('Camo')
AnnouncementText.Visible = true
wait(0.1)
AnnouncementText.Text = player.."has Increased the Multiplier by "..CurrentMulti.Value - OldMulti.Value
wait(3)
AnnouncementText.Text = "The New Multiplier is "..CurrentMulti.Value.."."
print(player.."has Increased the Multiplier by "..CurrentMulti.Value - OldMulti.Value)
print("The New Multiplier is "..CurrentMulti.Value..".")
end
IncreaseMultiplier.OnServerEvent:Connect(IncreaseMulti)
Okay, it took me a while but the problem here is that âplayerâ is an instance, or a game object, so use player.Name instead for it to be counted as a string
If this is supposed to display on a UI and become updated, then it would be because you are changing the values in StarterGui, and not the Playerâs personal UI.
Try using the playerâs PlayerGui instead of StarterGui, for a current update. You can use this by referencing player.PlayerGui
Iâm not too sure what you mean about it multiplying only once, but tell me if that is the issue.
Iâm Having Issues with the Multiplier now.
heres my script
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local points = Instance.new("IntValue")
points.Name = "Points"
points.Parent = leaderstats
local cooldown = game.ServerStorage.StarterValues.Cooldown.Value
local multiplier = game.ServerStorage.StarterValues.Multiplier.Value
while true do
wait(cooldown)
points.Value = points.Value + 1*multiplier
end
local data
local success, errormessage = pcall(function()
data = playerData:GetAsync(player.UserId.."-points")
end)
if success then
points.Value = data
else
print("Error while getting your data")
warn(errormessage)
end
end)
-- script A
local bindableEvent=Instance.new('BindableEvent')
bindableEvent.Parent=game:GetService('ReplicatedStorage')
wait(5)
binableEvent:Fire('Hello world!')
-- script B
local bindableEvent=game:GetService('ReplicatedStorage'):WaitForChild('BindableEvent')
bindableEvent.Event:Connect(function(message)
print(message)
end)