#how can i reverse a click detector
1 messages · Page 1 of 1 (latest)
Just set the 10 in goals to part2.Size - 0.5 or smth for each of them
wdym
If you want it to get smaller every click just replace the constant 10 with the parts size minus an amount
no sorry, what i meant is that when i click "part", "part2" increases in size so then what i wanted to do is when i click "part" again, "part2" shrinks instead
Create 2 separate tweens depending on the current size
In the function
If you know how tweens work you should know a simple if statement
💀
minus the parts size
He wants it to get bigger then smaller then bigger then smaller
But only size change when it's clicked
part.Size = part.Size - Vector3.new(-1, -1, -1,)
He wants this
So just a loop then?
Make a variable if its been activated once or not
???
Yea just have a bool value
actually, nevermijd that would be better but its a bit different
i forgot how to check if a part has a higher value than the other whoops.
@lost grail
- Make a variable so youll know if its been activated, (true/false)
and youll probably figure out the rest
just Fuck Around & Find Out
?
You need do compare the sizes
ill hop on pc latee and help you
How does he know tweens but not if statements bro
I wouldn't be surprised if it was AI actually
but for now, why not try a Boolean Value, if your confused about on how to do it then trg what ThatOneCookie said
i forgot how to compare Vector3 sizes so
its not ai, its just that im not sure where to put it
AI would completely fix it imo, wouldnt reccomend, but thats not AI
okay thanks
Then do else for the other case
Or if part.size > Vector3.new(1,1,1)
;compile
local function num(a)
if a >= 100 then
print("hi")
elseif a <= 100 then
print("bye")
end
end
num(101)
num(98)
hi
bye
;compile
local function num(a)
if a > 100 then
print("hi")
elseif a < 100 then
print("bye")
end
end
num(101)
num(98)
hi
bye
both works
Yes but he wants to check and exact size because the size he is making it go to is constant
would work but what if the size difference is a bit too large? but again that depends on him.
It's just switching between 2 sizes
i got it working now
Alr, good luck on the project
sorry for taking the time out from u guys
All good
part2.Size == Vector3.new(10,10,10)
I'm bored rn anyways
eh im bored, no time was taken away
just practicing on random things
Good job 👍
thanks 🙂
Good luck
alright, have fun with your project!