So I'm trying to make it so that when the player presses F, an Asteroid falls from the sky. When I do it with a regular script it works, but with a Local Script it doesn't.~~~~~~~~~~~~~~~~~ local AST = game.ServerStorage.Asteroid local UIS = game:GetService("UserInputService")
AST:Clone()
UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.F then AST:Clone().Parent = workspace end end) ~~~~~~~~~~~~~~~~~
Please help!
Hello there!
ServerStorage cannot be accessed by LocalScripts as it is for ServerScripts only.
Though, there's an easy solution for this; just use ReplicatedStorage.
Please accept this answer if it helped you.