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

Attemp to call method 'TweenPosition' (a nil value) ??

Whenever i execute the script the output would say " attempt to call method 'TweenPosition' (a nil value)"

--//Variable Getting || Setting
local button = script.Parent.Frame.Play
local size = 30 --//Size Of Blur || How strong it is
local blur = Instance.new("BlurEffect")
local Frame = script.Parent.Frame
local Music = game.Workspace.LobbyMusic
local Logo = script.Parent.Frame.ImageLabel
local Name = script.Parent.Frame.Name
local V = script.Parent.Frame.Version

--// Logo
while true do
		for i = 1, 360 do
		Logo.Rotation = i/.090
		wait()
		if Logo.Rotation == 720 then
		Logo:TweenPosition(UDim2.new(-1, -55,0.5, -55), "Out", "Quad")
		wait(2)
		Name:TweenPosition(UDim2.new(0.45, -271,0.374, -25), "Out", "Quad", 1)
		end
	end
end

2 answers

✓ Accepted answer

It’s because when you do local Name = script.Parent.Frame.Name, you’re actually referencing the actual name of the frame, which cannot be tweened.

You could fix this by either naming the ‘Name’ guiobject something else, or doing script.Parent.Frame[“Name”] to reference the instance.

Since "Name" is a child of the Frame, when running the line:

local Name = script.Parent.Frame.Name

You are calling the Name Property of Frame, (which is a nil value since the tween cant move a name) so just change the actual name of "Name" to something else and reapply it to the script, such as:

local Name = script.Parent.Frame.TextLabel

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