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

W000:Type mismatch number and nil with Udim2.new?

I'm trying to make a ui scale with the screengui's absolute size, but when I attempt to set the frame's size, regardless of input, will always underline the line in red and display this when hovered over;

W000:Type mismatch number and nil

local main = script.Parent
local frame = main:WaitForChild("Frame")

frame.Size = UDim2.new(0, 50, 0, 50)

I've worked with UI's before and never had this problem.

1 comment

0

what\

1 answer

✓ Accepted answer

I actually know the answer to this one.

I ran into this issue the other day when I was working with CFrames and as it turns out, it's just a beta feature being dumb. To get rid of it, at the top of your studio, click File and at the bottom click Beta Features. After that, make sure "Enable New Lua Script Analysis" is ticked off.

I'm not too sure as to why the script analysis doesn't like it but who knows.

1 comment

0

I knew I shouldn't have trusted them! Thanks!

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