Hi. I think something is formatted incorrectly here, but I'm not sure what. Do any of you have any ideas?

local clue= script:WaitForChild("TextButton")
local cluetext = clue:WaitForChild("Value")

local storage = game:GetService("ServerStorage")
local yval = storage:WaitForChild("yvalue")
local yvalue = yval.Value
local position = clue.Position.Y


local function clickity(player)
	local clone = clue:Clone()
	local playergui = player:FindFirstChild("PlayerGui")
	local scrollingframe = playergui.ScreenGui.Frame.TruthBulletz.ScrollingFrame
	clone.Parent=scrollingframe
	position= UDim.new(yvalue,0)
	yvalue=yvalue+0.06
	
	
	
end
script.Parent:connect(clickity)

3 comments

0

What is script.Parent? You can't just call the instance and expect something to happen, you have to define it. If the script.Parent is a text/image button then, script.Parent.MouseButton1Down:Connect(clickity)

0

also :connect was depreciated a long time ago. It still works, but hasnt been updated or modified since it was depreciated. use :Connect instead

0

The way you are trying to call the function is not right, you have to connect it when something happens, for example, script.Parent.MouseButton1Down:Connect(clickity)