So in a game that I made, when a player gets their balloon taken away, they get kicked out with a message that states: ,You have been kicked out due to unexpected client behaviour"
The only client script that runs when the balloon gets taken away are these two:
game.ReplicatedStorage.EnableAbility.OnClientEvent:Connect(function(bool)
script.Parent.UseAbility.Visible = bool
end)
game.ReplicatedStorage.AnnouncePopping.OnClientEvent:Connect(function(playerName)
if game.ReplicatedStorage.CurrentMode.Value == "Default" then
AnnouncePoppingLabel.Visible = true
AnnouncePoppingLabel.Text = playerName.." popped a balloon!"
Sounds.BalloonPopped:Play()
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,0.112, 0), "Out", "Bounce", 1)
wait(2)
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,1, 0), "Out", "Sine", 1)
elseif game.ReplicatedStorage.CurrentMode.Value == "BalloonKing" then
AnnouncePoppingLabel.Visible = true
AnnouncePoppingLabel.Text = playerName.." snatched the balloon!"
Sounds.BalloonPopped:Play()
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,0.112, 0), "Out", "Bounce", 1)
wait(2)
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,1, 0), "Out", "Sine", 1)
elseif game.ReplicatedStorage.CurrentMode.Value == "HotPotato" then
AnnouncePoppingLabel.Visible = true
AnnouncePoppingLabel.Text = playerName.." is the hot potato!"
Sounds.BalloonPopped:Play()
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,0.112, 0), "Out", "Bounce", 1)
wait(2)
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,1, 0), "Out", "Sine", 1)
elseif game.ReplicatedStorage.CurrentMode.Value == "Infection" then
AnnouncePoppingLabel.Visible = true
AnnouncePoppingLabel.Text = playerName.." has been infected!"
Sounds.BalloonPopped:Play()
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,0.112, 0), "Out", "Bounce", 1)
wait(2)
AnnouncePoppingLabel:TweenPosition(UDim2.new(0.225, 0,1, 0), "Out", "Sine", 1)
end
end)
I am unsure what exactly could be the issue. It only happens during this specific gamemode.