I want to make it so when you press a button text and a image pops up telling you how many points you earned. I want it to say the amount of points you earned and a custom image i have.
This is what i have so far:
cp = 0
local plr = game.Players.LocalPlayer
while wait() do
if cp ~= plr.leaderstats.clicks.Value then
local random = math.random(1,900)
local xnew = random/1000
local new = game.ReplicatedStorage.ShowAdd:Clone()
new.Parent = script.Parent.ScreenGui
new.Position = UDim2.new(xnew,0,1,0)
new.text = "+"..plr.leaderstats.clicks.Value - cp..""
cp = plr.leaderstats.clicks.value
end
end
Im also getting this error
12:13:02.293 - ScreenGui is not a valid member of PlayerGui "Players.ItzSulfonic.PlayerGui"

18 comments
Local script or server script?
local
Did you notice on line 12 that it's "value" and not "Value" (The "v" is supposed to be captialized)
whoops, i changed it
Does it work now? Also, what are your GUI's in PlayerGui?
why are u cloning it from rep storage?
So he could repeat that process again instead of getting an error saying that it doesn't exist. That's also why it's called "REPLICATED storage"
no im still getting the same error, and all i have in my gui is a menu and that script.
Whats the name of the menu, is it "ScreenGui"? Also, when you play the game, you can look into your PlayerGui and see what's in there.
oh now i see, in playergui i have guis named 'Main' "chat "freecam" and "bubblechat" main is what i use for my guis
And what's in Main?
a couple frames and image buttons
The names of them and there children's name
Clicks > clicks, image label, textboxt Gems> gems, image label, textbox rebirths click>click script
Welp, ScreenGui isn't in that right? If it not then I don't know what to say.
i tried changing the "main" gui name to ScreenGui now im getting a different error "text is not a valid member of TextLabel" idk what to do at this point and cant find nothing online
If you want to know more about GUI's, then go watch these videos: https://www.youtube.com/watch?v=4yeeGnEBzFY&list=PLhieaQmOk7nK9ob348Yc_PTcIyHjDCnem
alright thanks for trying