hello robloxians,
so i am just release new game today and some events no works here is the problem:
the scripts of that:
local player = game.Players.LocalPlayer
game.ReplicatedStorage.Events.UnboxBubble.OnClientEvent:Connect(function(DisplayUI)
script.Parent.Visible = true
wait(5)
script.Parent.Visible = false
end)
game.ReplicatedStorage.Events.BasicCrate.OnClientEvent:Connect(function(BasicCrate)
script.Parent.Crate.BasicCrate.Transparency = 0
script.Parent.Crate.UncommonCrate.Transparency = 1
wait(5)
script.Parent.Crate.BasicCrate.Transparency = 1
script.Parent.Crate.UncommonCrate.Transparency = 1
end)
while wait() do
if script.Parent.BubblePrizeText.Text == "Basic Bubble" and game.Players.LocalPlayer.BubbleInventory.Bubble1.Value <= 1 then
game.ReplicatedStorage.Events.Bubbles.BasicCrateBubbles.BlueBubble:FireServer()
print("fire 1")
elseif game.Players.LocalPlayer.BubbleInventory.Bubble1.Value >= 1 then
game.ReplicatedStorage.Events.OwnBubble:FireServer()
print("Already Own This Bubble.")
end
end
while wait() do
if script.Parent.BubblePrizeText.Text == "Fire Bubble" and game.Players.LocalPlayer.BubbleInventory.Bubble2.Value ~= 1 then
game.ReplicatedStorage.Events.Bubbles.BasicCrateBubbles.FireBubble:FireServer()
print("fire 2")
elseif game.Players.LocalPlayer.BubbleInventory.Bubble2.Value >= 1 then
game.ReplicatedStorage.Events.OwnBubble:FireServer()
print("Already Own This Bubble.")
end
end
while wait() do
if script.Parent.BubblePrizeText.Text == "Gum Bubble" and game.Players.LocalPlayer.BubbleInventory.Bubble3.Value ~= 1 then
game.ReplicatedStorage.Events.Bubbles.BasicCrateBubbles.FireBubble:FireServer()
print("fire 3")
elseif game.Players.LocalPlayer.BubbleInventory.Bubble3.Value >= 1 then
game.ReplicatedStorage.Events.OwnBubble:FireServer()
print("Already Own This Bubble.")
end
end
while wait() do
if script.Parent.BubblePrizeText.Text == "Toxic Bubble" and game.Players.LocalPlayer.BubbleInventory.Bubble4.Value ~= 1 then
game.ReplicatedStorage.Events.Bubbles.BasicCrateBubbles.GumBubble:FireServer()
print("fire 4")
elseif game.Players.LocalPlayer.BubbleInventory.Bubble4.Value >= 1 then
game.ReplicatedStorage.Events.OwnBubble:FireServer()
print("Already Own This Bubble.")
end
end
while wait() do
if script.Parent.BubblePrizeText.Text == "Water Bubble" and game.Players.LocalPlayer.BubbleInventory.Bubble5.Value ~= 1 then
game.ReplicatedStorage.Events.Bubbles.BasicCrateBubbles.WaterBubble:FireServer()
print("fire 5")
elseif game.Players.LocalPlayer.BubbleInventory.Bubble5.Value >= 1 then
game.ReplicatedStorage.Events.OwnBubble:FireServer()
print("Already Own This Bubble.")
end
end
script of alret if player own item:
while wait(0.01) do
game.ReplicatedStorage.Events.OwnBubble.OnClientEvent:Connect(function()
script.Parent.Visible = true
script.Parent.Text = "You Claimed Your Coins Back Because Get Same Item."
wait(13)
script.Parent.Visible = false
end)
game.ReplicatedStorage.Events.InventoryFull.OnClientEvent:Connect(function()
if game.Players.LocalPlayer.BubbleInventory.Bubbles.Value >= game.Players.LocalPlayer.BubbleInventory.MaxInventory.Value or game.Players.LocalPlayer.BubbleInventory.Bubbles.Value == game.Players.LocalPlayer.BubbleInventory.MaxInventory.Value then
script.Parent.Visible = true
script.Parent.Text = "Your Inventory Is Full."
wait(6)
script.Parent.Visible = false
end
end)
if game.Players.LocalPlayer.BubbleInventory.Bubbles.Value <= game.Players.LocalPlayer.BubbleInventory.MaxInventory.Value or game.Players.LocalPlayer.BubbleInventory.Bubbles.Value ~= game.Players.LocalPlayer.BubbleInventory.MaxInventory.Value and script.Parent.Visible == true then
script.Parent.Text = "Error."
warn(game.Players.LocalPlayer.Name .." With Inventory Error.")
warn("Getting Player.")
warn("Trying Open Again..")
warn("Faild.")
wait()
script.Parent.Visible = false
break
end
end
thanks for help.