#Paintball Gun doesn't work

1 messages · Page 1 of 1 (latest)

jagged knot
#

I'm working on a brickbattle game and tried to add the paintball gun so I've looked for it on Roblox toolbox and I found one, but it works totally diffrent than in games like Crossroads, Since that game is uncopylocked I, after that I decided to look for it there but after I imported it to my game it still doesn't work how I want it. Anybody knows what makes the paintball gun work in Crossroads but not in other games?

upbeat flare
gaunt niche
#

omg i was sending him the same crying

gaunt niche
#

And specially, stay away from uncopylocked games until you've built your first complete game

upbeat flare
gaunt niche
#

nah some of em got really useful assets

#

like guns vehicles etc

#

gui as wlel

#

well*

#

I'd rather stay away from most code I'd say

upbeat flare
#

idk i would rather create my own assets and save them for reuse

gaunt niche
#

I really got nth to do. bedtime it is

#

ill goto sleep after 45 mins

#

goto bed actually but yea

sleek swift
#

Why is applying velocity so annoying

#

😭

gaunt niche
#

ALV?

#

or BL?

sleek swift
#

Whichever one will actually slow down

#

I need recoil, but not in the normal sense. like i want the player to go backwards

gaunt niche
#

for recoil, consider ALV

#

tho u hadn't told me what part in particular is annoying bout it

sleek swift
#

keeps going

#

I want like an impulse

gaunt niche
#

Then you're prolly not using ALV

#

yk whats ALV?

sleek swift
#

Nope

gaunt niche
#

That makes sense

#

ALV's just what u need

upbeat flare
gaunt niche
#

AssembyLinearVelocity. its like an impulse

gaunt niche
gaunt niche
# sleek swift Nope

if u dunno how that works. just play test in studio and select ur humanoidRootPart and scroll down to find AssemblyLinearVelocity in the bottom. Set it to 0, 100, 0 and u'll see how it works

sleek swift
#
    local oppositeDirection = -direction.Unit
    local recoilVelocity = oppositeDirection * 50

    hrp.AssemblyLinearVelocity += recoilVelocity
#

This just

#

doesnt work

#

;-;

gaunt niche
#

its the math u havent shown in the snippet ig

#

tho u dont needa do that

#

just set the ALV once, thats all u needa do

#

not add.

sleek swift
#

Dude, i need like an example

lime dawnBOT
#

studio** You are now Level 3! **studio

gaunt niche
#

hrp.ALV = Vector3.new(0, 10, 0) try this

#

reference hrp correctly. use a server script

#

or just do it using the visual interface

#

just hit play test

#

ill guide u

sleek swift
#
IthacaModel37Fired.OnServerEvent:Connect(function(player, origin: Vector3, direction: Vector3)
    local character = player.Character
    if not character then return end

    local hrp = character:FindFirstChild("HumanoidRootPart")
    if not hrp then return end

    -- 🔹 Fire pellets
    for i = 1, NUM_PELLETS do
        local randomYaw = math.rad(math.random(-CONE_ANGLE, CONE_ANGLE))
        local randomPitch = math.rad(math.random(-CONE_ANGLE, CONE_ANGLE))
        local spreadCF = CFrame.fromAxisAngle(Vector3.yAxis, randomYaw)
            * CFrame.fromAxisAngle(Vector3.xAxis, randomPitch)

        local pelletDir = (spreadCF:VectorToWorldSpace(direction)).Unit
        launchPellet(origin, pelletDir, character)
    end
    
    
    local oppositeDirection = -direction.Unit
    local recoilVelocity = oppositeDirection * 50 -- adjust for strength

    local alv = Instance.new("AssembyLinearVelocity")
    alv.Attachment0 = hrp:WaitForChild("RootAttachment")
    alv.Mode = Enum.VelocityAlignmentMode.Vector
    alv.MaxForce = math.huge
    alv.Responsiveness = math.huge
    alv.VectorVelocity = recoilVelocity
    alv.Parent = hrp

    hrp.ALV = Vector3.new(0, 10, 0)
    
    
end)
gaunt niche
#

omg stop using ai

sleek swift
#

I just need like one working version that I can pick apart 😭

gaunt niche
#

JUSt PLAY TEST FIRST

#

U DUNNO HOW ALV WORKS

sleek swift
#

Hand on

#

Hang on

#

ima go find a yt video or documentation

upbeat flare
gaunt niche
#

if u've the time

gaunt niche
upbeat flare
#

thats like the only thing i ever finished for public useevilcat

#

im currently working on a custom TextChatService tho

sleek swift
# gaunt niche JUSt PLAY TEST FIRST
    
    local oppositeDirection = -direction.Unit
    local recoilVelocity = oppositeDirection * 500
    
    hrp.AssemblyLinearVelocity = recoilVelocity

Yeahhhh im still lost, watched a whole video too 😭

#

direction is the player's direction btw

gaunt niche
#

it should work btw. the force will work only once that disappear tho, if u dont repeat this assignment of ALV

sleek swift
#

Well, when it applys. I see nothing happen

#

litterally nothing (unless i jump) then it like

#

pauses in the air

#

its weird

upbeat flare
gaunt niche
#

ill do it right away

upbeat flare
#

its not much but pretty useful

gaunt niche
#

Yeah, it seems useful to me at least

#

I'll not have to worry about defining the data structures manually

#

it already defines em

#

plus some repetitive work is also abstracted.

#

Have you heard about DataStore2?

#

just outta curiosity

upbeat flare
gaunt niche
#

its really good for preventing data loss. I've seen users mentioning 0 data loss reports implementing it to games with high concurrent user count

#

prolly a tool worth using

#

after implementing it*

sleek swift
gaunt niche
#

wym. i told u it works

sleek swift
#

It doesnt 😭

upbeat flare
gaunt niche
#

give me the complete code.

sleek swift
#

IthacaModel37Fired.OnServerEvent:Connect(function(player, origin: Vector3, direction: Vector3)
    local character = player.Character
    if not character then return end

    local hrp = character:FindFirstChild("HumanoidRootPart")
    if not hrp then return end

    -- 🔹 Fire pellets
    for i = 1, NUM_PELLETS do
        local randomYaw = math.rad(math.random(-CONE_ANGLE, CONE_ANGLE))
        local randomPitch = math.rad(math.random(-CONE_ANGLE, CONE_ANGLE))
        local spreadCF = CFrame.fromAxisAngle(Vector3.yAxis, randomYaw)
            * CFrame.fromAxisAngle(Vector3.xAxis, randomPitch)

        local pelletDir = (spreadCF:VectorToWorldSpace(direction)).Unit
        launchPellet(origin, pelletDir, character)
    end
    
    
    local oppositeDirection = -direction.Unit
    local recoilVelocity = oppositeDirection * 50000
    
    hrp.AssemblyLinearVelocity = recoilVelocity
    
    
    
end)

Server side ^^^

Client side vvv


    local origin
    if muzzle:IsA("Attachment") then
        origin = muzzle.WorldPosition
    elseif muzzle:IsA("BasePart") then
        origin = muzzle.Position
    end

    -- Aim towards mouse hit point
    local targetPos = mouse.Hit.Position
    local direction = (targetPos - origin).Unit

    -- Fire to server
    IthacaModel37Fired:FireServer(origin, direction)
end)
upbeat flare
gaunt niche
#

tho as the game size grows

#

i mean wait

gaunt niche
#

I meant if the server size is big and data save requests are not throttled correclt

#

correctly then data loss occurs

#

n ur api doesn't seemingly deal with that

sleek swift
#

I just dont know the god damn syntax

upbeat flare
gaunt niche
lime dawnBOT
#

studio** You are now Level 11! **studio

gaunt niche
#

u cant afford to risk it when u have a api providing a safeguard

frigid mantle
gaunt niche
frigid mantle
#

its pretty easy to prevent data loss, just dont write bad code and you're all good fingerguns

upbeat flare
#

mhh i get it datastore works per universe and not per server

frigid mantle
#

but at the moment quotas are per server ;p

gaunt niche
#

apparently each server has a limit for api requests?

#

am i wrong

frigid mantle
#

ye that is quota

#

there is quota for datastores, memorystores, messagingservice, and badgeservice. apparently marketplaceservice has no quotas

#

you still need to treat it like it has a quota in case of failure of the backend

gaunt niche
#

data saving with safeguards i mean?

frigid mantle
#

if roblox servers fail it doesnt matter how good your system is

gaunt niche
#

yeah.

#

mb. It really can't help the backend failing constantly

frigid mantle
#

best safeguard is periodic saving in case of sudden shutdown to limit loss, you do need to manage your quota properly

gaunt niche
#

DataStore2 is just an API to handle few failed data syncing attempts

frigid mantle
gaunt niche
#

tho y bother if u can use the APIs?

frigid mantle
#

lazy solutions get lazy results ;o

#

you still need to know the limits, doesnt matter what system you use

upbeat flare
#

i mean if I get one of those two i just retry until i dont get the error code anymore right

gaunt niche
#

yea basic knowledge about datastores is a must

#

i aint denying that

frigid mantle
#

if you're trying to push more than 10 datastore updates per player per minute then it doesnt matter how good the system is or how it throttles - you're still going to get query flooding, and if it has a queue that's almost worse

#

coz over time if it throttles itself, for starters if you're at the limit then the queue backs up and never clears, and if you're not at the limit and its still throttling itself, you're wasting quota

#

e.g if you have less than 10 queries per min per player, then you can spend some of that quota for other players, and the server has its own bit of quota too. all of that is wasted if it self throttles

gaunt niche
#

ik i get it

#

DataStore2 already has that

#

btw

upbeat flare
#

If I save failed SetAsync / GetAsync and try to save them again after eg. 60s periodicly until it doesnt fail wouldn't that not just be the most reliable solution?

frigid mantle
#

since it'll get saved again 60s later

gaunt niche
#

I just looked up the limitations. We can do 60 save requests per DataStore per server

#

per minute

#

thats more than enough if u save periodically

frigid mantle
#

plus 10 per player per min

frigid mantle
upbeat flare
frigid mantle
#

it'll change to 250 per minute for ALL servers, plus 40 per minute per player across ALL servers

frigid mantle
#

yep

gaunt niche
#

I mean it makes sense given the rapid increase in roblox games sizes

frigid mantle
#

writes are 20 per minute per player

#

so the new limits will be a bit higher than they are now in practice

gaunt niche
#

btw whats ur fav game in rbx

frigid mantle
#

less server-allocated limit tho, but you can spend some of the players quota on that

gaunt niche
#

if ur in ur leisure time like me

#

u apparently are

frigid mantle
#

no i just dont have anything better to do, last time i tried to open studio it took 11 hours

gaunt niche
#

sad

#

so how'd u learn scripting in roblox?

frigid mantle
#

i read the docs

gaunt niche
#

Damn nerd skills

#

i can never imagine doing that without applying it

#

My guy got some real interest in it

upbeat flare
frigid mantle
#

i made stuff as i went obviously, you need to practice as you go

gaunt niche
#

whats ur most recent build?

frigid mantle
#

simulator game

gaunt niche
#

finished it off?

frigid mantle
#

yep

gaunt niche
#

les play it ig

#

if u dont have anything better

frigid mantle
#

i cant load roblox player either for same reason

gaunt niche
#

hm

#

wait u said u did learn by practicing

#

it means studio worked on ur pc before?

#

r u on ur mobile?

#

or sleep tablets?

frigid mantle
#

i dont have good internet

gaunt niche
#

oooo makes sense

#

tho studio doesnt require it, does it

upbeat flare
frigid mantle
#

it does, updates for one, and it needs constant connection

gaunt niche
#

can u name ur simulator game so i can try it

#

i wanna see how good u r, if i be brutally honest

#

I assumed u made that as a solo dev

frigid mantle
#

i copied an existing game that was getting 5k~10k ccu for .. this

#

turns out they just have way too much money to throw at advertising

gaunt niche
#

from title to desc, everything handwritten. im flattened

frigid mantle
#

the game doesnt matter

#

yea made everything on my own or from toolbox... and even the stuff from toolbox i had to modify a lot of it, specially the npcs

gaunt niche
#

god wheres my autoclicke

upbeat flare
frigid mantle
#

it has auto ;o

gaunt niche
#

oh yea it does

frigid mantle
#

balance is similar to the game i copied from too

upbeat flare
#

what is the bow for

frigid mantle
#

should take about 5~6 hours or so if you dont buy anything with robux

upbeat flare
#

oo i see

frigid mantle
#

might be 8 hours depends 🤷

gaunt niche
#

want a honest review?

frigid mantle
#

sure

gaunt niche
#

lemme look up a good adjective

frigid mantle
#

only thing wrong with it is some of the animations wont play or so i've heard

#

but there should be animation when you do anything

gaunt niche
#

the game's got system good for nothing

#

poor game design

frigid mantle
#

got system?

gaunt niche
#

systems*

#

crafting collection

#

i just like to call it that

#

just sep logic for each thing

#

i mean

#

also undefined loops or just too boring to be noticeable

#

This feels more like a practice project

frigid mantle
#

it still currently has 400 ccu's.

gaunt niche
#

its all good tho. a perfect first project

frigid mantle
#

that is my second

gaunt niche
#

fine either way

#

great actually

#

i could never build something like that

frigid mantle
#

well, 4th if you include the 2 test projects i made, +1jump/sec, and a button simulator that i got to the buttons and was like this is dum

gaunt niche
#

i dont have the patience

frigid mantle
#

i didn't earn back what i spent on ads

gaunt niche
#

u spent on ads?

frigid mantle
#

like 12 hours a day

gaunt niche
#

like roblox ads?

frigid mantle
#

roblox ads ye

gaunt niche
#

u gotta be kidding me

#

ever heard of youtube/discord/reddit?

#

i mean not to offend u but

#

they're better if the project's small

upbeat flare
frigid mantle
#

my other game is a monster in a maze game like color or die

#

same game pretty much

#

and this stupid slop game gets 400 ccu, while they were advertising it had 5k~10k

#

for this

#

mfw

gaunt niche
#

whats the game u copied from

frigid mantle
#

this one i just linked it

frigid mantle
#

but only coz i didn't have something to start with, i started from nothing

#

they probably have a template

frigid mantle
gaunt niche
#

i cant believe there are zombies who like to play these games among us too

gaunt niche
#

tho i had a really cool project i was to release

frigid mantle
gaunt niche
#

but i dropped the idea

gaunt niche
#

tbh all it'd take for me to build something worthy

#

is

#

nuke my schools

#

thats all it'd take

#

I built a really cool crow npc with really good animations and all sorts of abilities

#

I just had to automate its behavior and thats it

gaunt niche
#

uhm

#

its in studio

frigid mantle
gaunt niche
#

thats when I realized that im building a game thats too unique

#

when I have absolutely no idea about game designs

#

i just decided to stick to a proven game loop like a tycoon or simulator or battleground

#

i dont need to reinvent the wheel

#

thats what i thought when i decided that

#

lemme capture some clips for u guys

#

about the crow

upbeat flare
#

BRO YOU ARE KIDDING ME LIKE IM NEARLY IN THE 2ND WORLD AND THE FIRST REBIRTH COSTS 25$???????????????

#

ur so evil @frigid mantle

gaunt niche
#

its in-game currency

#

i think

upbeat flare
#

no shit but im loosing my 4,5k if i rebirth

#

im about to enter the 2nd world

gaunt niche
#

gimme a sec im fixing a lil bug

#

in the crow script

frigid mantle
#

it doesnt take all your money lol

upbeat flare
#

alright buddy

gaunt niche
#

here

#

im sry my pc's kinda crappy

#

this is a demonstration of the scouting behavior of these crows

#

oh i dint realized how fancy i got with words B)

#

dont tell me u both left now @upbeat flare @frigid mantle

#

COME BACK

upbeat flare
#

looks pretty cool

gaunt niche
#

I've paid extra efforts into keeping things modularized

#

for the first time

upbeat flare
#

module scripts are great

gaunt niche
#

i cannot believe how did i manage to organize this so well

#

this is the first time im so happy with my work

#

every logic is cleanly separately and reusable independently

#

oh wait they're inter-dependent actually but still they all have their own blocks of sep logic

#

im thinking to make this a simulator game

upbeat flare
#

why would you put this in replicatedstorage

gaunt niche
#

uh

#

y not

upbeat flare
#

cause the client can see everything

gaunt niche
#

oh right in the server side i should put it

#

ill do it

#

so yea the idea

#

ill make a harvesting game

#

with upgrade loops n flexing cosmetics

#

n these nasty enemies to survive thru

#

and save ur earnings

upbeat flare
#

good luck

gaunt niche
#

should I add animal cruelty too?

#

thatd be interesting

#

like torturing crows

#

as revenge

gaunt niche
jagged knot