Hello fellow programmers, I’m running into an issue with my script, it stops on the second line where it requires a module. I’ve narrowed it down to this line using print(). If you have any solutions or tips, please help.
print("0")
local FPS = require(game.ReplicatedStorage.Modules.FPS)
print("Module Found")
wait(0.2)
local Player = game.Players.LocalPlayer
local Gun = game.ReplicatedStorage.Weapons["AK-47"]
print("1")
function CreateViewModel()
local character = workspace:WaitForChild(Player.Name)
if character then
print(script.Name.." is working")
fps = FPS.new(character);
character = character
else
print(script.Name.." is not working")
character = nil
fps = nil
end
end
function EquipGun()
fps:equip(Gun)
end
print("2")
CreateViewModel()
EquipGun()
print("3")
Player.CameraMaxZoomDistance = 0.5
Player.CameraMinZoomDistance = 0.5
Player.CameraMode = Enum.CameraMode.LockFirstPerson