How to make a GUI Pop-Up Effect?

Hi Guys , I’m scripting a clicker game , so I want that when the player clicks , a GUI pops up saying about much clicks has got added and I also want to tween it , however , I tried many times , used many types of scripts , read the DevForum , but that didn’t helped me . You may help me , you may also give a script if you want , but I need some help !
It tried to use TweenPosition but it gave me error -
image

2 Likes

Can you show your code?

Try just showing/hiding the UI first, then add the tween later. This can help fix other errors that pop up.

1 Like

Ohk , I’m writing one more code right now , if it doesn’t works , I’ll send you the code

1 Like

It doesn’t work , let me send the code

Local script inside StarterPlayerScripts -

local UIS = game:GetService("UserInputService")
local Mouse = game.Players.LocalPlayer:GetMouse()

UIS.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
		script.Parent["Switch 2 (SFX)"]:Play()
		local ma = math.random(1,900)
		local new = ma/1000
		local new2 = game.ReplicatedStorage.Add:Clone()
		new2.Parent = game.StarterGui.ScreenGui
		new2.Position = UDim2.new(new,0,1,0)
		new2.Text = "+"..1*game.Players.LocalPlayer.Multiplier.Value
		game.ReplicatedStorage.Events.Click:FireServer()
	end
end)

Local script inside the TextLabel -

wait(.1)
script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X,0, -.1, 0))
wait()
for i=1, 20 do
	script.Parent.Rotation = script.Parent.Rotation+1
	script.Parent.TextStrokeTransparency = script.Parent.TextStrokeTransparency + 0.5
	script.Parent.TextTransparency = script.Parent.TextTransparency + 0.5
	wait(.5)
end

The label is inside ReplicatedStorage

Let me tell you everything works fine , even the tweening thing , but the textlabel doesn’t gets visible even the visible property is true in game and Studio also

1 Like

I realised tweening also not works now :frowning:

This should be the Players Gui not StarterGui:

new2.Parent = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui")
2 Likes

Ohk , let me try it and tell you if it works

1 Like

It works ! Thanks a lot for the help !

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.