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

What am i doing wrong?

ok so i have a clickdetector and a script inside a part. now i never renamed anything. so keep that in mind. so i made a screengui-frame and the frame is size (0,100 0.01 0) and everything else is defalt. inside the script of the part is this

start = 0.01
script.Parent.MouseButton1Down:connect(function()
start = start + 0.01
gui.Size = UDim2.new(0,100,start,0)
end)

now renember. i didnt name anything. or rename. i have a part on the baseplate. with a script and clickdetector. the script is above me. theres a screengui and a frame in startergui. do i name something between the part and the script? please help me with this

1 answer

✓ Accepted answer
start = 0.01
script.Parent.MouseButton1Down:connect(function()
start = start + 0.01
gui.Size = UDim2.new(0,100,start,0) -- Where did you get gui.Size from? Did you make a variable?
end)

You wrote "gui.Size" but you never defined a variable for gui.

2 comments

0

what could the variable be?

0

You would have to find the location of the GUI. Try finding the player and then the GUI somehow. Not sure how to do this. Sorry.

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