Script:
click = 0 local plr = game,Players.LocalPlayer while wait()do if click == plr.leaderstats.Crowns,Value then local random = math.random(1,1000) local xnew = Random/1000 local new = game.ReplicatedStorage.ClickingEffect:Clone() new.Parent = script.Parent new.TextBox.Position = UDim2.new(xnew,0,1,0) click = plr.leaderstats.Crowns.Value end end

2 comments
always use "." instead of ","
Format your code.