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

I want to require a local script so it will play the animation but comes unknown in the output?

Asked by 2 years ago

So i've created a Firework animation that plays from the players head once something is completed. But I wanted to test it out so I used the output 'Run a command' and typed in 'local firework = require(game.StarterPlayer.StarterPlayerScripts:WaitForChild("Firework").PlayAnimation()' but this comes unknown in the start. Is there something wrong with my script or are we not allowed to require in client

2 answers

Log in to vote
0
Answered by 2 years ago

Require is used on ModuleScripts, and in fact you can only require ModuleScripts. You can however require ModuleScripts from both client and server.

Roblox Documentation on ModuleScript and require

Ad
Log in to vote
0
Answered by 2 years ago

Require is used on ModuleScripts, and in fact you can only require ModuleScripts. You can however require ModuleScripts from both client and server.

Roblox Documentation on ModuleScript and require

Answer this question