The gui won’t show no matter what, I clone it from replicated storage and put it into player gui. If it makes a difference I’m firing the bindeable from the command box when the game is being played
local re = game:GetService("ReplicatedStorage")
local text = re.EatEffect
local bindeables = re.Bindeables
local effectEvent = bindeables.PlayEffect
effectEvent.Event:Connect(function(amount)
local effect = text:Clone()
effect.Parent = game.Players.LocalPlayer.PlayerGui.ScreenGui
effect.Visible = true
effect.Text = "+"..amount.." Coins"
effect.Position = UDim2.new(math.random(-50, 50), math.random(-50, 50))
effect:TweenPosition(UDim2.new(0, 325,1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, false)
end)
If you intend the GUI to appear when the player joins the game, localscripts will already do that.
If anything is nil, you should add :WaitForChild() and wait for that object.
Also, Udim2 takes four arguments, not two. So your position is also being set incorrectly. Try fixing it to be `UDim2.new(0, math.random(-50,50), 0, math.random(-50,50))
All good bro, I suggest you ask AI in the future. Its a great tool for beginners and can help you catch these small mistakes quickly and help you remember.