Currently, I'm using a serverScript to edit text of something in a for loop.

Heres my script right now:

local debounce = false

script.Parent.MouseButton1Up:Connect(function()
	if debounce == false then
		wait(0.1)
		for i, v in pairs(game.Players:GetChildren()) do
			local cloned = script.Announcement:Clone()
			cloned.Parent = v.PlayerGui
			print(v.Parent)
			wait(0.5)
			debounce = true
			
			--make new variables
			local ammount = script.Parent.Parent.Time.Text
			local notification = v.PlayerGui.Announcement.TextLabel.TextLabel
			local text = script.Parent.Parent.Set.Text
			
			--make the text actually do what i want it to
			v.PlayerGui.Announcement.TextLabel.TextLabel.Text = text --right here is what is not working
			
			--tweeeeeeeeeeeeeeeeeen
			notification.Parent:TweenPosition(
				UDim2.new(0.5,0,0.1,0),
				"Out",
				"Quad",
				0.7,
				false
			)
			wait(ammount) --not working as well
			notification.Parent:TweenPosition(
				UDim2.new(0.5,0,-1.1,0),
				"In",
				"Quad",
				0.7,
				false
			)
		end
	end
end)

Any help or things to point out would be appreciated.

1 comment

0

They can, but I don’t recommend using them with UI as it won’t appear for only the client. You can using remote events for stuff you want to do server sided.