The GUI is not moving?

I have no Idea why this localscript is not doing anything to the textGUI to appear

For default the position of the text is {0,0}{0,0}

I wonder if there is anyone that could help me? I am new to animating GUIs.

local textLabel = script.Parent

local function DisplayText(text)
	for i = 1, #text do
		textLabel.Text = string.sub(text, 1, i)
		wait(0.01)
	end

end

script.Parent.AttributeChanged:Connect(function()
	print("Something change")
	textLabel.Parent:TweenPosition(
		UDim2.new(0.01,0,   0,0),
		"Out", "Quint",
		0.5, false,
		DisplayText(textLabel.Text)
	)
	print("Made the thing")
	wait(10)
	textLabel.Parent:TweenPosition(
		UDim2.new(0,0,   0,0),
		"Out", "Quint",
		0.5, false,
		DisplayText(textLabel.Text)
	)
	print("Finished")
end)
1 Like

Does it need to be a local script? Is the TextLabel Visible Property Set To True?

Sometimes after making a TextLabel, then placing it somewhere (like a frame), can make it smaller.

Sometimes it is just the wrong scaling. In that case, try this: AutoScale Lite - Roblox

It is a local script and it is not moving or printing.

I use the local script because it is supposed to appear for one person, since the GUI will be used to show the region.

Here is something that might help

I think it does not detect the AttributeChanged event, but it still does not detect it trough a normal script.

Speaking of Attribute. What is supposed to change?

The text is supposed to change, since it will change to the name of the region using Region3, but I am changing it manually to test it before making it change to the region

change this

to this

textLabel:TweenPosition

the reason of this is because textLabel is the TextLabel itself and you can only move or tween Position/Size of Frames, TextLabels, TextButtons, and most types of Gui except for the Screen Gui

You can also move multiple gui inside of a frame when moving the frame itself

im just guessing that the script is placed under the the TextLabel

The script is under the TextLabel, and the TextLabel is under a frame

It IS a LocalScript man, Just like I mentioned before in this entire thread!

You’re using AttributeChanged, you said there are no prints so it means there’s the problem.

AttributeChanged won’t fire unless you use SetAttribute Method

script.Parent:SetAttribute("pos", Vector3.new())

I have never heard about that, definitely confuses me.

Why did you use AttributeChanged then? What are you trying to do? Have it fire whenever you are in a region or what?

Have you tried making a StringValue in your Player Object and update it from there? Use .Changed on that instead and it should fire.

sorry for the long typing, im trying to solve your issue but as whitexhat said, your using attributechanged.

When you enter a region, The GUI text will change, so I am detecting that

I mean, I could create a custom event instead.

You can simply make a StringValue in Player called “Region” and change the Value to new region name so for ex. you enter region called “test” and change the value to “test” and then the .Changed in this script will fire.

Player.Region:GetPropertyChangedSignal'Value':Connect(function() --// replace attribute changed
--// your function used
end);
1 Like

This worked! Thank you so much!