Basically whenever the EggCollect RemoteEvent gets fired to a client the client does as following in the script. Everything works except making the BasketFrame.Egg visible and playing the actual Tween. I even tried keeping it visible and it does not play the Tween. I cannot seem to help myself in any way. I appreciate any help.
Note: I do receive no Error messages.
Local Script:
EggCollect.OnClientEvent:Connect(function(eggName)
local EggData = Rep:FindFirstChild("EggData")
if EggData then
if not EggData[eggName].Value then
EggData[eggName].Value = true
local count = tonumber(string.match(BasketCount.Text, "%d+"))
count = count + 1
if game.Workspace.Eggs:WaitForChild(tostring(eggName)).TextureID == "rbxassetid://12919198848" then
BasketFrame.Egg.Image = "rbxassetid://13041747973"
elseif game.Workspace.Eggs:WaitForChild(tostring(eggName)).TextureID == "rbxassetid://12919326162" then
BasketFrame.Egg.Image = "rbxassetid://13055714365"
elseif game.Workspace.Eggs:WaitForChild(tostring(eggName)).TextureID == "rbxassetid://12919312260" then
BasketFrame.Egg.Image = "rbxassetid://13055812175"
elseif game.Workspace.Eggs:WaitForChild(tostring(eggName)).TextureID == "rbxassetid://12919262681" then
BasketFrame.Egg.Image = "rbxassetid://13055841502"
end
BasketFrame.Visible = true
BasketFrame.Egg.Visible = true
BasketFrame.Egg.Position = UDim2.fromScale(0.2, 0)
game:GetService("TweenService"):Create(BasketFrame.Egg, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {Position = UDim2.fromScale(0.2, 0.7)}):Play()
UpdateBasketCount(count)
wait(0.5)
BasketFrame.Egg.Visible = false
BasketFrame.Egg.Position = UDim2.fromScale(0.2, 0)
end
end
end)