Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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.

0
what\ Fifkee 2017 — 4y

1 answer

Log in to vote
4
Answered by
ArtBlart 533 Moderation Voter
4 years ago
Edited 4 years ago

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.

0
I knew I shouldn't have trusted them! Thanks! Utter_Incompetence 856 — 4y
Ad

Answer this question