#how do i do this

1071 messages · Page 2 of 2 (latest)

primal hedge
autumn coyoteBOT
#

studio** You are now Level 4! **studio

dull dust
#

its 4 am, i delegate the help to iQuadla

upbeat coral
#

why do u want my place'

dull dust
#

im too tired to help

primal hedge
#

just like i said reproduce

upbeat coral
primal hedge
dull dust
#

rest assured ill go to sleep as soon as i finish it

upbeat coral
#

@primal hedge am confused

#

i downloaded a copy

#

and nothing happened

primal hedge
#

open file explorer

#

find downloads

#

paste your rbxl file here

upbeat coral
upbeat coral
primal hedge
#

you probably placed it somewhere while saving it as file

upbeat coral
#

alr am gonna do smt

primal hedge
#

most of the problem is in your raycast function

#

you're using attachment's local position instead of world position and you didn't include params in workspace:Raycast()

#

simply replace attachment position to attachment worldposition and include params in line 14

upbeat coral
upbeat coral
primal hedge
#

replace the first argument too and put params in last argument

upbeat coral
# primal hedge replace the first argument too and put params in last argument

so like this

    local params = RaycastParams.new()
    params.FilterDescendantsInstances = {player.Character,gun}
    params.FilterType = Enum.RaycastFilterType.Exclude
    local result = workspace:Raycast(gun.Handle.Attachment.WorldPosition, CFrame.lookAt(gun.Handle.Attachment.WorldPosition, mouse.Hit.Position).LookVector * 1000,params)
    return result
end
primal hedge
#

yes

upbeat coral
upbeat coral
#

yay

primal hedge
#

good

upbeat coral
#

ok am going to bed now there’s one more thing i wanted to do with the gun

#

to make it for when u click on nothing it still shoots a beam far out

#

i will try to do that tmr

#

or should i say today

#

cuz its 1 am

#

i will do it after i sleep

#

and a few other things after i finish sleeping

upbeat coral
#

am back chat\

upbeat coral
#

@primal hedge i need help

#

its the same problem but with the raycast nil thing

#
    local raycast = Raycast()
    print(raycast)
    if raycast == nil then
        local attachment0 = Instance.new("Attachment")
        attachment0.Parent = workspace.Baseplate
        attachment0.Name = "attachment0"
        attachment0.WorldPosition = gun.Handle.Attachment.WorldPosition
        local attachment1 = Instance.new("Attachment")
        attachment1.Parent = workspace.Terrain
        attachment0.Name = "attachment1"
        attachment1.WorldPosition = CFrame.lookAt(gun.Handle.Attachment.WorldPosition, mouse.Hit.Position).LookVector * 150
        local beam = Instance.new("Beam")
        beam.Attachment0 = attachment0
        beam.Attachment1 = attachment1
        beam.Color = ColorSequence.new({
            ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 234, 3)),
            ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 247, 0)),
        })
        beam.LightEmission = 3 -- use additive blending
        beam.LightInfluence = 1
        beam.FaceCamera = true -- beam is visible from every angle
        beam.Segments = 10 -- default curve resolution
        beam.Enabled = true
        beam.Parent = attachment0
        beam.Width0 = 0.2
        beam.Width1 = 0.2
        local sound = Instance.new("Sound", game.SoundService)
        sound.SoundId = "rbxassetid://1905367471"
        sound.Volume = 0.5
        sound:Play()
        for i = 0, 1, 0.1 do
            beam.Transparency = NumberSequence.new(i)
            task.wait(0.03)
        end
        task.wait(0.3)
        beam:Destroy()```
#

😭

#

wait

#

the same problem is happening again

#

omg guys i did it

#

i have such a big brain

#

i didnt need help

#

i figured it out myself

#

@dull dust

dull dust
#

nice

upbeat coral
#

@dull dust

#

is there a way i can still get the position of the raycast even if its nil?

#

@dull dust

#

@fals

#

omg i did it

#

bymyself again

#

u were right

#

googling does work

dull dust
#

it does

primal hedge
#

cool

upbeat coral
#

ok