Hello,
So i am trying to improve my Weapon by adding a ModuleScript to Control certain functions inside them,
But i was wondering, Are ModuleScript functions Visible on the Server?
Module Script Currently:
local Settings = {
--/Services/-->
-- TweenService = game:GetService("TweenService");
--RunService = game:GetService("RunService");
Debris = game:GetService("Debris");
UserInputService = game:GetService("UserInputService");
--/Script Paths/-->
--Server = script.Parent.Server;
--Client = script.Parent.Client;
--AimClient = script.Parent.Aiming;
--/Bools/-->
Shooting = false;
IsAiming = false;
IsActive = false;
CanReload = false;
--/Main/-->
Player = game.Players.LocalPlayer;
Camera = workspace.CurrentCamera;
Lighting = game.Lighting;
--/Tool Paths/-->
Tool = script.Parent;
--FirePart = script.Parent.Handle.Flash;
FireEvent = script.Parent.Fire;
Case = script.Parent.Case;
Bullet = script.Parent.Bullet;
--/Weapon Settings/-->
AmmoCapacity = 20;
AmmoMax = 21;
Firerate = .05;
Damage = 5;
DesiredHumanoid = "ZHumanoid";
FireSound = "rbxassetid://1772743949";
FireSound_Volume = 4;
FireSound_Pitch = 2;
FleshHitSound = "rbxassetid://3092866899";
FleshHitSound_Volume = 2;
FleshHitSound_Pitch = 1;
--/Animations/-->
IdleAnimation = "rbxassetid://11229562610";
FireAnimation = "rbxassetid://11229624726";
WeaponFireAnimation = "rbxassetid://11203319898";
AimingAnimation = "rbxassetid://11352093206";
AimFireAnimation = "rbxassetid://11352321268";
FlashTextures = {
[1] = "rbxassetid://421803006";
[2] = "rbxassetid://421803091";
[3] = "rbxassetid://421803134";
};
}
function Settings:FireEvent()
print("fired")
local Sound = Instance.new("Sound", Settings.Tool.Handle)
Sound.SoundId = Settings.FireSound
Sound:Play()
Settings.Debris:AddItem(Sound, Sound.TimeLength)
local A = Settings.Case:Clone()
A.Parent = workspace A.VectorForce.Enabled = true
Settings.Debris:AddItem(A.VectorForce, .03)
Settings.Debris:AddItem(A, 1)
local Flash = Settings.Tool.Handle.Flash.MuzzleEffect:Clone()
Flash.Parent = Settings.Tool.Handle.Flash
Flash.Texture = Settings.FlashTextures[math.random(1, #Settings.FlashTextures)]
Flash.Enabled = true
Settings.Debris:AddItem(Flash, 0.03)
end
function Settings:SetFiringStatus(Status: boolean)
Settings.Shooting = Status
end
function Settings:SetAimingStatus(Status: boolean)
Settings.IsAiming = Status
end
return Settings