Help with tweening guis


function enabledialogue()
	local dialogue = Player.PlayerGui.DialogueGui
	local abcd = coroutine.wrap(function(p1)
		local starterpos = p1.Frame.Position
		return starterpos
	end)
	local pos = abcd(dialogue)
	dialogue.Frame.Position = dialogue.Frame.Position + UDim2.new({0, 0},{0.4,0})
	ts:Create(dialogue.Frame,tweeinfo2,{Position = pos}):Play()
end

task.wait(2)
enabledialogue()


In this script i get the starterpos of the gui (the where its supposed to be on the screen, its already set in the startergui) and set it downward using a simple equation (im doing it bcs everyones screen and resolution is different.) I try to tween them but the tween simply doesnt play? No changes to gui it just stands still in place

Are you aware of anything returning nil or anything similar to that?

nope
just checked the part where i combine the pos with udim doesnt work for some reason

You should never do this with the curly brackets {} as it errors in the codespace itself

To rewrite this code and possibly create a solution:

UDim2.new(0, 0, 0.4, 0)
1 Like

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