Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is TweenPosition broke or something? My script will not working for some reason.

My TweenPosition script is not working and I have no idea why.

function hide(name)
	name:TweenPosition(UDim2.new(0, 0, 1, -50), 'Out', 'Bounce', 1)
end


script.Parent.Parent.Players.PlayerAdded:connect(function(player)
	local SMGuiC = script.Parent.Parent.ServerStorage:WaitForChild("SMGui"):Clone()
	local smtext = SMGuiC:WaitForChild("SM").SMText
	smtext.Text = "You joined the server with Rank "..player:GetRankInGroup(3583996)
	SMGuiC.Parent = script.Parent.Parent.StarterGui
	SMGuiC.SM.Visible = true
	wait(3)
	print("you got mail")
	hide(SMGuiC.SM)
	wait(1)
end)

2 comments

0

You don't exactly use hide() in this script... u make it a function and name isn't really defined

0

Do you know how functions work?

1 answer

The server doesn't have access to the PlayerGui if FE is on. Do this on the client.

LocalScript in theSMText component of the gui. Place the gui in StarterGui.

local player = game.Players.LocalPlayer
local smtext - script.Parent

function hide(name)
    name:TweenPosition(UDim2.new(0, 0, 1, -50), 'Out', 'Bounce', 1)
end

smtext.Text = "You joined the server with Rank "..player:GetRankInGroup(3583996)
wait(3)
print("you got mail")
hide(smtext.Parent)

This discussion is preserved as it was. New answers, comments, and votes are closed.