Hello,
I’m new to the forums here and need help with a fundamental issue that prevents me from learning more about scripting, which is what I’m trying to do.
Code Example:
game.Workspace.Part.anchored = false
wait(5)
game.Workspace.Part1.anchored = true
astraIboy
(The Batman)
August 17, 2023, 7:19pm
2
What do you mean wait() command won’t work?
Also you should be using task.wait() as wait() is deprecated
@astraIboy well everything works as typed however the wait() command is ignored.
also Ill try that right now
astraIboy
(The Batman)
August 17, 2023, 7:21pm
4
What do you mean ignored, is it not waiting the 5 seconds?
exactly
char limitchar limitchar limit
Scottifly
(Scottifly)
August 17, 2023, 7:23pm
6
Since you’re new, let’s look at the basics.
Your script is looking for a Part in the workspace. Do you have many Parts? If so it’ll randomly pick just one of those Parts.
Are you opening the game in Test mode Play, or Run?
Play takes a few seconds to load in, so the script may have already waited 5 seconds.
Try using Run to see how long it takes for the Part to drop.
i just opened an old test thing that used dice that would un-anchor themselves on execution
Code:
game.Workspace.Dice2.Anchored = false
wait(10)
game.Workspace.Dice1.Anchored = false
also, no other parts exist, they should be referenced correctly
I’m opening it in Run
( I extended the time to up to 9999 to test, no use )
SelDraken
(SelDraken)
August 17, 2023, 7:26pm
8
put a print statement, before and after the task.wait(10)
such as
print("Before")
task.wait(10)
print("After")
and see what results you get in the output.
Scottifly
(Scottifly)
August 17, 2023, 7:26pm
9
You aren’t setting Anchored to true first if that’s what you are trying to do.
Fimutsuu
(Fimutsu)
August 17, 2023, 7:27pm
10
that’s impossible as Scot said check if they’re anchored before you run
dooominick
(dooominick)
August 17, 2023, 7:28pm
12
thanks man ill flag this as the solution, let me test rq though.
don’t know why this didn’t occur to me o7
1 Like
system
(system)
Closed
August 31, 2023, 7:29pm
13
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.