script:
workspace:

Module scripts don’t work in workspace
also instead of using:
workspace:FindFirstChild("Part") == true
do this:
workspace:FindFirstChild("Part")
ok thxs let me try it and tell you if it works
It’s not a solution it’s just more optimized way of saying FindFirstChild(“Part”), Just change the Cookie modulescript to script and it will work.
no i am not using the modulescript i am using local script
What do you get when you print something inside the repeat loop?
huh can you explain more i can’t understand what you mean
it can’t detect if i clicked it for not
Print something inside the repeat loop
repeat
if workspace:FindFirstChild("Part") then
print("smth")
....
yo it worked i was doing
if workspace:FindFirstChild("Part") == true then
but when i changed it to it worked
if workspace:FindFirstChild("Part") then
yes, that’s because FindFirstChild returns an Instance
, not true
or false
. When you do if <something> then
, that’s the same as writing if <something> == true or <something> ~= nil then
.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.