Recently I am trying to make a gun and i searched up in the Youtube on how to make a gun.
All I got is how to use free models and how to make a low/mid ploy gun on ROBLOX.
People usually hire tutors to teach them how to make a gun(I guess) but I don’t have enough Robux to hire a tutor.
So i searched upon the dev forum on how can I make a gun.
I saw similar posts like this but couldn’t find an answer.
I wanted to know if anyone know a site or a Youtube video which shows how to make a gun(Not alvin_Blox’s)
I suggest making your first weapon using TweenService, for instance:
LocalScript:
local tool = script.Parent;
local function on_Equip(mouse)
mouse.Button1Down:Connect(function()
local remoteEvent = script.Parent.Remote;
remoteEvent:FireServer(mouse.Hit.p)
end)
end
tool.Equipped:Connect(on_Equip)
ServerScript:
local remoteEvent = script.Parent.Remote;
local function server_Event(player, mouseHit)
local replicatedStorage = game:GetService("ReplicatedStorage")
local rocket = replicatedStorage:FindFirstChild("Rocket")
local rocketClone = rocket:Clone()
rocketClone.Parent = workspace
local handle = script.Parent.Handle
rocketClone.Position = handle.CFrame.Position + handle.CFrame.LookVector * 2.3
local distance = (mouseHit - handle.Position).Magnitude
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
distance / 70,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out
)
local goals = {
Position = mouseHit
}
local tween = tweenService:Create(rocketClone, tweenInfo, goals)
tween:Play()
wait(distance / 70)
rocketClone:Destroy()
local explosion = Instance.new("Explosion")
explosion.Parent = workspace
explosion.Position = mouseHit
end
remoteEvent.OnServerEvent:Connect(server_Event)
Note: This is an example of an RPG that I made not so long ago.
I’m glad it helped. By the way, if you saw any scripts on ServerScriptService do not add them to your game. It’s a plugin that I used it was a weird virus, just do not add them. It’s called ‘studio_detection_by_azure’ something like this.
Sorry for the late respond, I don’t quite remember what plugin it was. But just try to disable each of your enabled plugins and wait until this doesn’t appear anymore, then you’ll know what plugin it is.