Here is my script, it isn't working.
function Examp() VariableName = 9423 if game.Workspace:FindFirstChild(VariableName) then print("It worked") end print(VariableName) end
The point of this script is to find a part Named 9423 but even if that part exists, the game will still think the part does not exist. Please only help if you really know the answer. Thanks!
Ok so it actually does. Make sure your part in workspace is named 9423 and you are calling the function Examp()
. Although it will work, I strongly suggest changing the variable to a local variable
and putting quotes
around 9423
in line 2
, like this:
function Examp() local VariableName = "9423" if game.Workspace:FindFirstChild(VariableName) then print("It worked") end print(VariableName) end Examp()
If this doesn't solve your problem, then you should probably investigate and check to see if roblox studio is running properly for you by doing tests. If roblox studio is working but it still isn't, then I don't know what to tell you. Oh also there might be another script interfering with your script. If there is, then modfiy that script to allow this to work.