#code-discussion

1 messages · Page 177 of 1

obtuse jasper
#

ya ty

late dirge
#

Theres no necessary bad way to fire to a server, there's simply sanity checks on the server

gilded stag
vast hornet
#

it only works when i press Z+ctrl

hidden sable
#

bro 😭

vast hornet
#

holy shit im going crazy

gilded stag
blazing oasis
#
Hi
hidden sable
#

which key combos u want

vast hornet
# hidden sable which key combos u want
local userInput = game:GetService("UserInputService")


local keysDown = {}

userInput.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end

    keysDown[input.KeyCode] = true

    if keysDown[Enum.KeyCode.Z] and (keysDown[Enum.KeyCode.LeftControl] or keysDown[Enum.KeyCode.RightControl]) then
        print("HAHAHA")
    end
end)

userInput.InputEnded:Connect(function(input)
    keysDown[input.KeyCode] = nil
end)

#

look

#

ctrl+z

gilded stag
#

😭

obtuse jasper
#
hi
vast hornet
#

maybe ctr+z doesn't work in studio

blazing oasis
#

It does

vast hornet
#

only in client

blazing oasis
#

Sometimes

#

Do u mean in game

vast hornet
blazing oasis
#

Like during testing

vast hornet
#

does it work or not

gilded stag
#

just do keysdown[leftctrl] and z if uw ant it liek that

blazing oasis
#

SO U NEAN NORMALLY OR WHEJ U CLICK PLAY

late dirge
blazing oasis
#

oh wait I might be stupid idk anymore I thought u meant control z asin undo

hidden sable
#

local userInput = game:GetService("UserInputService")

local keysDown = {}

userInput.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end

keysDown[input.KeyCode] = true
keysDown[input.UserInputType] = true

if keysDown[Enum.KeyCode.Z] and keysDown[Enum.KeyCode.LeftControl] then
    print("HAHAHA")
end

end)

userInput.InputEnded:Connect(function(input)
keysDown[input.KeyCode] = nil
keysDown[input.UserInputType] = nil
end)

#

it works

vast hornet
hidden sable
vast hornet
hidden sable
#

z + contorl will work

#

if u want control + z

#

then change z to control, control to z

glass dust
#

i am scripter if anyone want to hire me DM me

vast hornet
#

z+contrl works

#

but ctrl+z doesn't

hidden sable
#

BRO

#

you want both?

vast hornet
#

and what fucking psychopath does z+ctrl

vast hornet
gilded stag
hidden sable
#

local userInput = game:GetService("UserInputService")

local keysDown = {}

userInput.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end

keysDown[input.KeyCode] = true
keysDown[input.UserInputType] = true

if keysDown[Enum.KeyCode.Z] or keysDown[Enum.KeyCode.LeftControl] and  keysDown[Enum.KeyCode.Z] or keysDown[Enum.KeyCode.LeftControl] then
    print("HAHAHA")
end

end)

userInput.InputEnded:Connect(function(input)
keysDown[input.KeyCode] = nil
keysDown[input.UserInputType] = nil
end)

#

here u go

gilded stag
#

lmaooo

obtuse jasper
#

What kind of use case does this serve

#

Like who would need this

vast hornet
hidden sable
hidden sable
vast hornet
#

im making a build mode

hidden sable
#

learn basics first

vast hornet
late dirge
#

holy skid

vast hornet
#

looking at this i'd say im probably better than you

hidden sable
#

wdym

hidden sable
#

also if its works dont touch unless u want change anything

#

you dont even know simple logic on if statements 😭

vast hornet
obtuse jasper
#

Nah @hidden sable tries to help you for 10 min on a problem you're not capable of solving yourself and you switch up on him

stiff citrus
torn cargo
#

how to stop someone from jumping

vast hornet
#

"you don't know anything about luau" like what the fuck 🥀

hidden sable
vast hornet
# hidden sable JumpHeight = 0
if keysDown[Enum.KeyCode.Z] or keysDown[Enum.KeyCode.LeftControl] and  keysDown[Enum.KeyCode.Z] or keysDown[Enum.KeyCode.LeftControl] then
        print("HAHAHA")
    end

late dirge
vast hornet
torn cargo
hidden sable
vast hornet
torn cargo
vast hornet
#

are you stupid 🥀

hidden sable
#

a strange person who asks for help and acts foolishly

polar shore
#

any1 need a discord server made dm me

vast hornet
hidden sable
vast hornet
#

like holy shit

#

im convinced this is ragebait

hidden sable
#

and its working

#

for both combos

vast hornet
hidden sable
#

z + leftcontrol, leftcontrol + z

vast hornet
#

try pressing ctrl only

#

and try pressing Z only

hidden sable
#

sent the code

#

ohhh

#

yeah

#

my bad u should tell me ealier

vast hornet
torn cargo
#

does the character / humanoid have a cframe or positio n

vast hornet
hidden sable
vast hornet
#

cframe contains position and orientation

hidden sable
#

im trying to help u

#

and u trying race with me

vast hornet
#

roblox studio just doesn't detect anything when ctrl is pressed

hidden sable
#

oh i see

#

yeah u was right

#

i learned new thing thanks to u

vast hornet
#

it was weird how you said "you don't know anything about luau"

hidden sable
torn cargo
vast hornet
torn cargo
#

im tryna put the part to the character/player position or wtv

vast hornet
# torn cargo cframe?

to get the position of the character you should look for a certain part inside it called "HumanoidRootPart"

grand oak
potent shell
#

this is a localscript but when a player sits down the other players camera switches?

--Services--
local players = game:GetService("Players")
local workspace = game:GetService("Workspace")
local repStorage = game:GetService("ReplicatedStorage")

--Variables
local group1 = workspace.Group1
local seat1 = group1:WaitForChild("Chair1"):WaitForChild("Seat")
local otherSeat = group1:WaitForChild("Chair2"):FindFirstChild("Seat")
local player = players.LocalPlayer
local currentcam = workspace.CurrentCamera
local newCamera = group1:WaitForChild("CameraPart")
local playerGui = player:WaitForChild("PlayerGui")
local TableGuisFolder = playerGui:WaitForChild("TableGuis")
local LeaveGui = TableGuisFolder:FindFirstChild("LeaveGui")

local debounce = false

seat1:GetPropertyChangedSignal("Occupant"):Connect(function()
if debounce then return end
debounce = true

LeaveGui.Enabled = true
if seat1.Occupant ~= nil then
currentcam.CameraType = Enum.CameraType.Scriptable
currentcam.CFrame = newCamera.CFrame
else
    currentcam.CameraType = Enum.CameraType.Custom
end

debounce = false

end)

otherSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
if debounce then return end
debounce = true

LeaveGui.Enabled = true
if otherSeat.Occupant ~= nil then
    currentcam.CameraType = Enum.CameraType.Scriptable
    currentcam.CFrame = newCamera.CFrame
else
    currentcam.CameraType = Enum.CameraType.Custom
end

debounce = false

end)

wide vapor
#

How many of you guys use ai for coding?

hidden sable
#

but usually ai cant find the bug

#

so i do everything myself

wide vapor
#

What AI do you use?

#

Claude is usually good when you ask it to add debug logs

#

imo

hidden sable
#

cursor and chatgpt

#

claude 4.5 max is my favorite

wide vapor
#

Never heard of cursor. Is it good?

hidden sable
#

yeah its just 20$

torn cargo
#

local function onSeated(isSeated, seat)
if isSeated then
Humanoid.WalkSpeed = 0
Humanoid.JumpHeight = 0
LeaveButton.Visible = true

    -- Create the CameraPart
    local CameraPart = Instance.new("Part")
    CameraPart.Name = "CameraPart"
    CameraPart.Size = Vector3.new(1,1,1)
    CameraPart.Anchored = true
    CameraPart.CanCollide = false
    CameraPart.Transparency = 1
    CameraPart.Parent = workspace

    local HumanoidRootPart = Humanoid:FindFirstChild("HumanoidRootPart")
    if HumanoidRootPart then
        CameraPart.CFrame = HumanoidRootPart.CFrame * CFrame.new(0, 3, 6) * CFrame.Angles(0, math.rad(180), 0)
    end

    local player = game.Players.LocalPlayer
    local camera = workspace.CurrentCamera
    camera.CameraType = Enum.CameraType.Scriptable
    camera.CFrame = CameraPart.CFrame

    LeaveButton.TextButton.MouseButton1Click:Connect(function()
        Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
        Humanoid.WalkSpeed = 16
        Humanoid.JumpHeight = 7.2
        LeaveButton.Visible = false

        camera.CameraType = Enum.CameraType.Custom
        CameraPart:Destroy()
    end)
end

end im tryna offset the part its not offseting

foggy isle
#

print("hello world")

#

👍

torn cargo
#

👍

fair copper
#

wasted a day on trying to do animation weights only to realize fade is better with just more animations

rapid mural
#

hey if i want to disable the jump when im using a dash or a skill or smth else what should i do ?

bleak oak
#

anyone wnna script on my bllk game

#

dms

potent shell
potent shell
#

Wait why do you create the camera part?

torn cargo
#

so u put the current camera (client) to it

narrow vault
#

i have a template from a guy i worked with

rapid mural
#

how do i have to do if i want my body to dash according to my body rotaion like if i dash to the front but moove my cam/body to the right the velocity go to the right becase now im just going only front even if i turn

dusky spindle
#

Advertising games in videos until I get enough subscribers to start charging! DM me if you want your game in one.

compact spoke
torn cargo
narrow vault
#

jk but its 1 am for me and i am not on my pc

torn cargo
#

i dont rlly need it

normal flame
torn cargo
#

do u know how to get the angle right

torn cargo
normal flame
#

are you modyinf the humanoidroot part to make that view?

torn cargo
#

i forgot ab character = ...

#

no im making a camera part

#

then

#

mofiying that

normal flame
#

do this

#

create a part

#

where you wanna to put it

#

then connect it

#

done.

torn cargo
#

its kinda

#

more diffuclt than that

#

bc i got other chairs

#

but i kinda dont want to do that since im alr been doing this for like an hour

normal flame
#

setattribute

torn cargo
#

sigh man

#

im js gonna do it

#

but still the angle wont be right

#

im tryna have a top down overview

#

plus im tryna make it scaleable

wild veldt
#

Anyone want to team up and make a game?

gilded ruin
#

i am looking for scripters that are interested in working for a studio (milk a brainrot) (it has an investor), dm me for more

cinder basalt
torn cargo
ancient scarab
torn cargo
#

i js put the camera in front of the player

somber vault
#

Could anyone teach me how to script, basically just teach me the basics and the build up? I have no experience, would you be willing to do it for free?

cinder basalt
#

all u need

simple bane
#

Any scripters that are advanced, want to help me understand how to set up your game scripta like a proffesional. Why do I need to create my own ”services” and how does a normal ”service” set up look like with :init and stuff. I have tried looking around but none of the explanations I have found makes me understand

fallen star
#

Search up OOP or frameworks and i think that will help

somber vault
cinder basalt
#

be self taught

#

set yourself a goal and work towards it learning on the go

somber vault
#

ok

simple bane
somber vault
cinder basalt
#

go slay

potent shell
potent shell
# torn cargo sigh man

What I did was make each group och chairs and table a model then put a part in it and then just make that the camera

potent shell
cinder basalt
torn cargo
potent shell
cinder basalt
#

its just so easy to make

torn cargo
potent shell
turbid raptor
#

I don't know what to make for my portfolio any ideas?

turbid raptor
cinder basalt
dense wren
#

Is this channel for just lua discussion?

cinder basalt
turbid raptor
cinder basalt
#

its also for politics

#

religion

#

whatever anyone mentions

turbid raptor
#

No he meant coding languages

cinder basalt
dense wren
#

Is a python journey worth it in 2025 or do i stick with java

cinder basalt
#

stick with java

#

(im biased af)

dense wren
#

Im honestly making bad progress

#

I started exactly a year ago today

#

And its going pretty bad tho i can code simple stuff just not things a normal 1 year journey should be able to do

#

I dont think python should give me that problem

lost pebble
dense wren
lost pebble
#

ive been coding for 5 years and only recently do i actually feel comfortable and confident in making a game on roblox

dense wren
#

The thing is i used to code on roblox when i was a kid and i have the same amount of knowledge in java as i did in lua and i only did lua for 2 months

#

Im starting to think java isnt for me

lusty barn
#

java KittyStare

fiery heron
dense wren
lost pebble
# dense wren Im starting to think java isnt for me

the moment you give up is the moment you mess up. i was interested in video game design since 2015, and it took me until 2020 until i could start to make my own scripts (they were terrible; but it was a start). dont worry about "do i know enough" or "is this enough progress." everyone learns at their own pace, and if you stick with it, you come out on the other side

cinder basalt
dense wren
#

I understand but when it comes to looking at a programming language and it being annoying makes it harder to make progress maybe that is “weak”

dense wren
lost pebble
#

lua and java

dense wren
#

Which one do you prefer

#

I mean which one are you more comfortable with

lost pebble
#

probably lua

#

ive spent more time with it

dense wren
#

Is it cause youve been doing it longer

#

Hmm

lost pebble
#

i learned java 2 years ago and only recently started to use it to make minecraft plugins

dense wren
fiery heron
#

is not completed but I need someone to try it with me

fiery heron
dense wren
dense wren
fiery heron
#

a roblox game

lost pebble
lost pebble
#

AP Computer Science A?

dense wren
#

Yeah

lost pebble
#

yup

dense wren
#

Honestly most dreadful thing ive been through

modest canyon
lost pebble
wild veldt
#

Do any of you guys major in CS

dense wren
lost pebble
lost pebble
dense wren
#

Im thinking of pursuing an IT career

#

Its a bad career though but I have no choice

lost pebble
modest canyon
#

still trying to crack down on the whole frameworks of building games with oop tho

dense wren
lost pebble
#

did my discord freak out? or did someone send a message that got auto deleted?

dense wren
#

I saw it too

lost pebble
#

lua has its own paradigm and i like to stick with it. when i try to use oop with metatables, it breaks my flow that i have with it. but each to their own. as long as it's not spaghetti code

lusty barn
#

not sure if it's a bot

lost pebble
dense wren
lost pebble
#

like cframes and stuff?

dense wren
#

cframes werent bad

#

But there was this physics part about it

#

There was this guy with five years of lua experience that helped me code something

#

And it had physics in it

#

It said something like physics.(34,56) or something along the lines

lost pebble
#

idk what you're talking about

dense wren
#

Ill show u in the morning its somewhere in my computer

hearty trellis
#

_G my goat 😍

fading nimbus
#

i forgot how to script

fringe warren
#

ill pay 3k if someone helps me recolor stuff its super easy just time consuming

unborn kestrel
#

function chunking:Start() globalConnection = RunService.RenderStepped:Connect(function() local hrpPos = HumanoidRootPart.Position if hrpPos.Z >= Limit then Effect:ClearVFXCharacter(Character) HumanoidRootPart.Velocity = Vector3.new(0, 0, 0) Character:PivotTo(CFrame.new(hrpPos.X, hrpPos.Y, Back) * CFrame.Angles(0, math.rad(180), 0)) end end) end

why does player flicker when teleporting

dusky kestrel
fringe warren
#

no the meshes are split up

#

so its not the same

#

cant use command prompt

turbid cliff
#

Yo can anyone help me rq in my game

#

pls

cinder cipher
clear flame
#

Rolve wouldnt be that dumb. i hope atleast

its like 90% prone to false positive depending on the users specs

open yarrow
#

on the clientside btw

clear flame
solar quartz
#

who watched hxh before and is interested in making a hxh game (I mainly script and ui)

potent shell
uncut minnow
#

How does one know what to code when they have a task

inland solstice
#

i was thinking abt making a Slash hitbox in front of player and i was thinking abt using GetPartBoundsInBox 2 times at client and then server and if client hits a player it calculates the distance between both server and client's distance to hit target and if it is in radius it does the dmg what do yall think im not a pro scripter and i wonrder if this will work?

somber vault
#

What's preferred way of starting playback of several Sounds at the same time(with high regard for sync)? I see SoundGroup only gives me a Volume.
Is answer anything other than iterating through array of Sounds?

wild kayak
#

How can i make a ragdol slap like steal a brainrot

lost pebble
gilded ruin
#

i am looking for scripters that are interested in working for a studio (milk a brainrot) (it has an investor), dm me for more info

soft rose
#

my gane spamming purchase prompt for 3rd party strange gamepasses when not in studio, and can't find any source code for purchase prompt or marketplaceservice or sus require, anyone knows how to find out the virus?

narrow vault
soft rose
#

i got 626 lines of requires and no sus number require

#

and no results for getfenv

tacit moss
#

OOP isnt always the way too sometimes it over complicates the simplest things but it is nice

neat tree
#

we prefer to have it our own way and be lazy

#

which is actually pretty efficient

#

saves time and also less to process

tacit moss
#

yeah

#

everyone write code different 🧘

unique like dna 😴

plucky drift
#

Hi

#

Heyyy

#

So

#

Can someone help me make a ui for a gampass

#

The flying carpet

turbid raptor
valid olive
#

Anybody want to invest

wild kayak
#

Anyone wanna buy some full game

fervent belfryBOT
#
Tag » Investing Channel
  • This server no longer supports investors, and it was removed due to the majority of the investments being scams or donation requests.

  • Asking for an investor in any of our channels classifies as channel misuse, and may be punished as such.

fallen summit
#

@valid olive ^^^^^^^^^^^^^^^^^^^ look at this message above ⬆️ ⬆️ ⬆️

strong panther
#

can somone help me change the speed on the felipe r15 killer model

hidden sable
fallen summit
valid olive
#

What you ping me for

fallen summit
#

so you can look at the tag

tropic plume
#

bro didn’t even read the message

valid torrent
#

should I use something like react-lua or fusion?

gilded ruin
#

Good day everyone, i am currently looking for a scripter for my studio titled “one line of code” we specialise in making slop games which earn a lot of robux. our current project is a game called “milk a brainrot”.

So there's a conveyor with random brainrots in there. if you have enough cash you can pick up the brainrots, put them on the platform, and then milk them. over time they collect milk, and you get the milk and sell it. then with the sold milk you can buy more brainrots.

I need a scripter to script various systems, including offline earning, rarity in the conveyor system, milking system,and other similar systems.

As we already have a pretty big investor for the game ads (he is going to invest 100k+ robux), I am offering a % of the game earnings. considering poop a brainrot has 2k CCU, this game won’t really fail, especially with the ads. If it fails, then I offer a 250$ or a 25k robux compensation.

velvet vapor
#

hi guys does someone know how to change character of a player to a part properly? i am currently doing just player.Character = part and i am getting ~1 second lag on empty baseplate which is nasty

icy gale
#

Is this seriously the only way to detect plugin context
local isPlugin = pcall(function() RunService:IsEdit() end)

vagrant saddle
vagrant saddle
#

You want youre character to spawn as another character or?

velvet vapor
#

and there is a lag when i am doing it prob u can see it

vagrant saddle
#

You can do that by putting the chatacter you want in "StarterPlayer"

#

And giving it name "StarterCharacter"

velvet vapor
#

i want just be able to change it while i am in the game

vagrant saddle
#

Yes that could work also if you make it in the script.

icy gale
#

Is it being made on the server?

velvet vapor
#

no i just put it under a local script as an example

icy gale
#

If it's being put as a child of a local script, and that local script is in starter character scripts, it's being made by the server

#

since it has to be initially copied in

#

so I don't know exactly why this happens because logically it shouldn't, but i believe it's because of network ownership

velvet vapor
#

yea okey i understand but i have a delay so it should be already loaded and as you see it immediately appears and the lag starts only after some time

#

it seems like more a humanoid lag

icy gale
#

Yeah I know. It makes zero sense, because characters are supposed to contain only owned things

#

I've run into this exact issue before

#

your options are to put the reference part in replicatedstorage and clone it in client side, then propagate it with a remote

#

or create it on the server outside the character, ensure you set the network owner to the player, then you can probably parent it to the character

#

Option 1 is probably best. Network ownership in roblox is screwed up

static coral
#

make sure it got humanoid

velvet vapor
static coral
#

oh

#

i think its probably some script that is connected to runservice then or a loop

#

maybe try setting camera type to scriptable before switching and then switch it back

icy gale
#

I believe it lets you move it a little because of prediction

static coral
#

or make custom character system

icy gale
#

Then eventually the server catches up, properly assigns it to the client and the client re-adjusts

velvet vapor
icy gale
velvet vapor
icy gale
#

I don't know exactly how your character authority is replicated- just know messing around with your character like that is gonna lead to big problems down the line. Solvable problems, but weird ones

tight tartan
#

What's the best way to dash? Battlegrounds style

vagrant saddle
vagrant saddle
tight tartan
icy gale
#

Dashing is another difficult problem to solve. woo

vagrant saddle
#

Its not at all.

icy gale
#

Getting it consistent is

#

I haven't found a reliable way to use velocity and impulses to overcome the friction consistently

vagrant saddle
#

Using either CSA or UIS getting a key you want for dashing and making it go where camera points at with velocity, its easy.

icy gale
#

imo the best way is tweening with an alignposition. it isn't ideal

icy gale
tight tartan
#

My friend said to use bodyvelocity but it's a bit buggy when you jump, I think I'll try with lerp or tweenService

icy gale
#

yeah bodyvelocity is deprecated

tight tartan
#

I know

vagrant saddle
icy gale
#

uhhh another way is to shapecast your route and stop if you hit smth

icy gale
# vagrant saddle But does it matters?

honestly? no, lmao. I can't disagree. you can just ensure all of your surfaces have the same friction and use a different constant if you're airborned

#

but what can I say, I like to over-engineer

vagrant saddle
unreal nest
#

hi

icy gale
vagrant saddle
unreal nest
icy gale
#

I won't disagree it's easy to just design around that constraint

vagrant saddle
icy gale
wild veldt
vagrant saddle
icy gale
vagrant saddle
#

Exactly the same problem I countered while I was making one system.

unreal nest
vagrant saddle
icy gale
#

ofc you can set assemblylinearvelocity each frame too, I guess

vagrant saddle
vagrant saddle
icy gale
#

or... raycast the next frame you'll walk to, hide an alignposition inside your character, and float them very slightly above the floor with jumping turned off. Skull

vagrant saddle
#

😰

unreal nest
#

@vagrant saddle

vagrant saddle
unreal nest
vagrant saddle
# unreal nest

I have made that aswell in the past, using webhook from a discord bot and sending data to it.

icy gale
#

did you know every turkish person under the age of 40 has played mount and blade

unreal nest
vagrant saddle
icy gale
#

(sick ass game)

unreal nest
#

lol

icy gale
#

I wish it was easier to move a ton of parts at once in roblox. ive always wanted something like m and b but run into tech limitations quick

potent shell
#

is there something im doing wrong here which makes it so if a player sits all cameras move?

seat1:GetPropertyChangedSignal("Occupant"):Connect(function()
if debounce then return end
debounce = true

LeaveGui.Enabled = true
if seat1.Occupant ~= nil then
currentcam.CameraType = Enum.CameraType.Scriptable
currentcam.CFrame = newCamera.CFrame
else
    currentcam.CameraType = Enum.CameraType.Custom
end

debounce = false

end)

vale sparrow
#

Hey guys, I found a tool that copies any (game + script) from any Roblox game. If you want, send me a DM

visual maple
#

im new to oop and i was wondering how i can implement profilestore to an oop based framework

potent igloo
#

So whenever the sit gets occupied, all local scripts detect it and change the camera position

potent igloo
uneven sierra
#

its not the overall memory usage

potent shell
eager dagger
#

is using the PlayerModule good?

wild kayak
#

how can i use theme on studio pls anyone say

icy edge
#

Could you explain what you are referring to when you mention "theme"?

icy edge
#

Hm

#

Are these not from roblox studio?

wild kayak
icy edge
#

You might wanna ask ai

#

it can probably help you

wild kayak
icy edge
#

Chatgpt

fluid pier
#

for folders

#

id recommend js using rojo at that point if youre a scripter

#

the files would be locally stored

wild kayak
#

i cant drag n drop

wild kayak
fluid pier
#

oh wait

fluid pier
#

like in rep storage

wild kayak
fluid pier
fluid pier
latent hearth
#

google it

wild kayak
wild kayak
#

idk how to use

fluid pier
fluid pier
# wild kayak what to search on yt

Today we look at how to setup and use the amazing development tool Rojo for easily creating Roblox games! Rojo enables us to create our Roblox games inside of Visual Studio Code, which has tons of advantages over using Roblox Studio's IDE.
Subscribe for more Roblox development tutorials!

Visual Studio Code (VSC):
https://code.visualstudio.com/
...

▶ Play video
main shuttle
#

best scrpting hack ever

#

ctrl a

#

backspace

vagrant saddle
foggy isle
#

Your imagination is the scariest thing you've experienced

#

Think about it.....

viscid zinc
#

for _,v in pairs(workspace:GetDescendants())do if v:IsA(ParticleEmitter)then v:Emit(v:GetAttribute(EmitCount))end end

main shuttle
#

(i just know they are needed in .000111% of all scenarios)

patent hatch
#

hey guys i have a part in my game where if it gets destroyed it respawns back after some time the problem is when it comes back and a player happens to be inside while it respawns it traps them inside, any ideas to fix this?

patent hatch
#

i should just move the player?

idle horizon
#

need help lads, how can I grip my tools? I tried a plugin but didnt work, I only see the handle, not the rest of my slapping hand.

lapis parrot
#

if anyone needs help with scripting for a reasanble price dm me

wary void
#

otherwise its useless

unreal nest
#

@fresh oak My different projects

wise turtle
unreal nest
fresh oak
#

omg

fair copper
lilac kiln
#

Gm coders

unreal nest
unreal nest
unreal nest
heavy gull
#

Imma try and start learning to code

inland solstice
#

how do ppl make hitbox without server-client delay ?

obsidian gale
#

can anyone help me with some really complicated code

late sapphire
#

omg my market simulation is working

obsidian gale
static coral
#

send

obsidian gale
#

um what

#

one sec

static coral
#

send screenshot and send what the problem is

#

im on mobile so i cant see it anyway

obsidian gale
#

bro the screenshot is so big it dont fit on my screen

#

its like 290 lines

static coral
#

just send the part u need help with

#

then maybe send any other parts that may be relevant

#

also remember u can ctrl scroll

#

for zoom

obsidian gale
#

have fun

static coral
#

ok so what is the problem

static coral
obsidian gale
#

it says its not in character nor player

#

but it clearly is

#

the tool names are all correct

static coral
obsidian gale
#

cant rn but im really confident its in the players backpack

static coral
#

also gang ts is chatgpt 🥀

obsidian gale
#

the code in mine, i asked chatgpt whats wrong and it gave me a shitty script

static coral
#

also the elseif block is useless you can just do startCleaning(player, tool.Name)

#

then do validation in the startCleaning function

#

u should maybe just rescript it

#

its quite hardcoded

fair copper
#

guys what could be the logic behind having a procedural burst effect?

#

like if i explode a building

#

how does that work on roblox?

#

is that supposed to be pre recorded?

static coral
static coral
fair copper
#

yeah well like say bug eggs

static coral
#

or should always happen the exact same

fair copper
#

larva types

#

people shoot it and it bursts

fair copper
#

so like a preloaded effect for that particular model maybe

static coral
#

personal preference then. you can either make a few loose parts and then animate them bursting, or you can just apply some force on all the loose parts

fair copper
#

hmmm i see

#

maybe i can do something by separate the model into a few parts

static coral
#

or an arc

fair copper
#

animation would be light?

#

right

static coral
#

yeah should be fine

fair copper
#

i assume animation is pretty light on the memory instead of physics

static coral
#

depends, animation will be best for either client or server because animations are always replicated and played on client only (default anims system atleast) but physics will have to be replicated every frame if done on server

#

tweens will also be replicated every frame

#

if done on server

fair copper
#

ouhh

#

yeah animations are gonna be light

fresh oak
#

im having a client-sided hitbox system, is these check enough to test if the client isnt altering the combos? im kind of slow, and cant really evaluate on my own rn 😭 (total 5 combos btw)

static coral
fair copper
#

i have a client sided and server sided state module that keeps track of the combo step

#

because its responsive

#

so yeah u have 2 ways for checking

fresh oak
#

the client uses the combo from the assigned by the server im just making a check in case they alter the combo number

fair copper
#

then u just make ur server smarter

#

to assume that after this combo it'll be that

#

the client either stops doing combo or does the next one

#

which the server is already aware off and if that isnt the case they are busted anywawy

fresh oak
#

ahh

fair copper
#

im sure ur passing some kind of token to make a series of the combo

fresh oak
#

then i can assign a value when its validating the combo and then make it have the values like the next combo or the first combo (in case combo reset). this works right?

fair copper
#

i guess

#

have a combo window on the server as well

fresh oak
fair copper
#

air attacks, light attacks, heavy attcks, heavy air attacks etc

fresh oak
fair copper
#

i passes a string based value from scripts which validates the combos

fresh oak
#

mine is a simple system, so i aint using tokens

fair copper
#

yeah thats all good its just part of a framework im using

#

static values

#

lol

fresh oak
#

damn ;-;

fair copper
#

so when i have the tokens being sent

#

server and client should match that static module

#

for the attack to be even valid

#

yeah but thats basically it

fresh oak
#

ooooh

#

so if the server passes a different token then it would cancel out the attack? thats genius

fair copper
#

yeah it cant go outside the defined tokens

#

or series

#

since my L3 has 18 damage and my L1 has 10 damage

#

i need to prevent player from skipping L2 and spamming L1 L3 L1 L3

#

lol

fresh oak
#

i see :O

fair copper
#

Network.RangedHitRequest = Packet("C_RangedHitRequest",
Packet.Static1, -- attackId (e.g., "L1")
Packet.Vector3F32 -- The world position the crosshair hit
)
like this

fresh oak
#

that would be so bad if the players can just skip combos 😭

fair copper
#

this is my version of remoteevents

fresh oak
#

oh u use packet

#

:O

fair copper
#

yeah yeah

#

for this game its fine

unreal nest
fair copper
#

lol

fresh oak
#

imma go make the changes rq :P

#

what just happened

fair copper
fresh oak
quartz harness
#

Can anyone fix my issue when player jumps he can't move he will jump on his position

        task.spawn(function()
                if not StealDb then return end
                for i, part in pairs(StolenThing:GetDescendants()) do
                    if part:IsA("BasePart") then
                        part.CanCollide = false
                        part.CanQuery = false
                        part.CanTouch = false
                        part.Massless = true
                        part.Anchored = false
                    end
                end
                
                local PrimaryPartStolen = StolenThing.PrimaryPart
                if PrimaryPartStolen then
                    local StealingoffsetCFrame = CFrame.new(0,1, -1.5)
                    PrimaryPartStolen.CFrame = TriggeringHumanoidRootPart.CFrame * StealingoffsetCFrame
                    
                    local Weld = Instance.new("WeldConstraint")

                    Weld.Name = "StealWeld"
                    Weld.Part0 = TriggeringHumanoidRootPart
                    Weld.Part1 = StolenThing.PrimaryPart
                    Weld.Parent = StolenThing.PrimaryPart    
                end
            end)
quartz harness
fair copper
#

it'll stop u from moving n stuff

#

in air

quartz harness
main shuttle
ruby nebula
#

give me an idea of a UI based game plesa

fair copper
static coral
ruby nebula
static coral
#

battleship

#

cookie clicker

#

minesweeper

#

papa’s cookerias

#

that would be so tuff to make

fair copper
#

there used to be a game on facebook

#

back in 2011

static coral
#

farmville?

#

pet rescue?

fair copper
#

i think

#

it was ville something

#

yea

static coral
#

farmville will require some 3d tho

#

(preferably)

fair copper
#

hmm yea those games were like isometric graphics

wild veldt
#

Anyone want to team up and make games?

obsidian gale
#

how should a coding portfoilo look like

crystal oriole
worn swan
#

does anybody have some video on how to make a movement system similar to how tower defense simulator does for enemies?

#

because im just wondering how they do it

static coral
potent igloo
#

then you move them by anchoring their hrp and tweening

worn swan
#

especially on like curves

#

that what i was worried about

potent igloo
#

you will never learn by copying tutorials btw

worn swan
#

i might copy it but i want to understand it first

fair copper
#

very cool

worn swan
#

hopefully its not too hard

fair copper
#

nah its not too much complex

lean ocean
#

you can use workspace:GetServerTimeNow() to sync enemies between client and server

#

server its just a cframe

#

with some stuff like health walkspeed etc

#

as u can see received is very low

meager sky
#

Anyone Voulenteer for video editing? 20 sec video.

bitter harbor
#

guys my scripts in roblox studio aren’t saving i was making a combat system and it said data will not be saved because this is a test game how can i fix this

tired remnant
dense wren
#

@lost pebble
if v:IsA("BasePart") then game.PhysicsService:SetPartCollisionGroup(v,"c") end
game:GetService("PhysicsService"):CreateCollisionGroup("c")
game:GetService("PhysicsService"):CollisionGroupSetCollidable("c","c",false)

timber flax
#

How much should I pay scripter for fully working car system (drifting/touge)

idle musk
vagrant saddle
#

For free or a payment?

#

Im really sorry but I do not accept %.

storm monolith
#

can anyone help me i have a rent house system and it makes the door transparent once u buy it and i have a door that works opens and closes and im trying to combine them but its not working

storm monolith
#

i tried it’s not working

vagrant saddle
#

What seems to be a problem of combining them?

storm monolith
#

i just watched a yt video for both i’m not good at scripting

storm monolith
lost pebble
# dense wren <@341697337321848833> if v:IsA("BasePart") then game.PhysicsService:SetPartColl...

im guessing this is in a for looplua if v:IsA("BasePart") then --(Depracated) Sets a BasePart's collision group. First argument is the BasePart; second is the name of the group. game.PhysicsService:SetPartCollisionGroup(v,"c") end --(Depreacted) Creates a new collision group. Argument is the name of the group. game:GetService("PhysicsService"):CreateCollisionGroup("c") --Sets the collision group's collision between 2 groups. game:GetService("PhysicsService"):CollisionGroupSetCollidable("c","c",false)btw im confused on why the group and its properties are created after the if statement. i feel like they should be created outside the for loop

vagrant saddle
#

Tell me how the door is opening?

storm monolith
vagrant saddle
#

Sure.

storm monolith
#

i think that will be easier and quick

#

alr bet

vagrant saddle
#

In the server.

storm monolith
#

which r u in

ruby nebula
#

what should i script that gives experience?

torn cargo
torn cargo
rotund pendant
rotund pendant
rotund pendant
# torn cargo if anybody could help me

for _, Seat in SeatList do
if Seat.Occupant then
local humanoid = Seat.Occupant
local character = humanoid.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player then
startEvent:FireClient(player)
end
end
end

thats the fixed code

rotund pendant
real hemlock
#

hey

naive pivot
#

yo guys i need some help im learning to code right and im gonna use isntance.new to spawn a part but how do i know what to put the position as?

radiant estuary
#

im trying to make a dash script should i put in starter character scripts or starter player scripts

torn cargo
#

i think

#

no character

#

js search it up

radiant estuary
turbid raptor
#

I made a procedural maze system that can generate a random maze each time and i've also got a bot that i can spawn pressing a button and make it solve the maze with the BFS algorithm

#

I need to know what to add to it

thorn lark
#

I know you going to hate me but I’m looking for a scripter speczailsing in combat and movment systems for percantage please flame me but we have progress on the game

unborn kestrel
#

should i code like leif?

thorn lark
#

?

unborn kestrel
thorn lark
#

Oh

thorn lark
#

For scripter

unborn kestrel
thorn lark
#

Uhm

#

Idk but can u do combat and movment systems?

unborn kestrel
#

bro dms

frank quiver
torn cargo
frank quiver
halcyon hill
#

3 years of exp btw

frank quiver
#

I haven't tried it in any other language yet so idk how to do with Lua or java

unborn kestrel
#

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")

local equip = {}

local Remotes = ReplicatedStorage:WaitForChild("Remotes")
-- // Modules // --
local Data = require(ServerScriptService.Modules.Data.Loader.Data)
local Plot = require(ServerScriptService.Modules.Plot.Plot)
local plotShared = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("Services"):WaitForChild("Plot"):WaitForChild("PlotFunctions"))

function equip:Init()

    Remotes:WaitForChild('EquipCannon').OnServerEvent:Connect(function(player,name)
       local OwnedCannons = Data:GetCannonIndex(player)
local CannonEquip = player.Cannon

       if table.find(OwnedCannons,name) then
        local playerPlot = plotShared:GetPlot(player)
     
        Remotes:WaitForChild("StrokeCannon"):FireClient(player,CannonEquip.Value,name)
CannonEquip.Value = name


   if playerPlot then
            for _, cannon in playerPlot.Cannon:GetChildren() do
                cannon:Destroy()

            end
Plot.loadCannon(name,playerPlot)
        end

       end
        
    end)


    
end


return equip

cooked or cooking

halcyon hill
torn cargo
torn cargo
halcyon hill
#

Thank you

unborn kestrel
torn cargo
torn cargo
#

ggs

#

u got custom or its like a package?

unborn kestrel
#

self made

torn cargo
#

damn i wanna make one u got some tips

vocal valley
#

someone help bru process receipt aint workin for me

torn cargo
vocal valley
#

ok one sec

#

i couldnt send it

torn cargo
#

put it in a notepad

#

then send the note pad file

vocal valley
#

it's too long

#

ok

torn cargo
#

put it into two sections

vocal valley
#

k

#
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")


local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory")

local productIdByName = {
    cash2500 = 3387422369,
}

local grantPurchaseHandlerByProductId = {
    [productIdByName.cash2500] = function(_receipt, player)
        local leaderstats = player:FindFirstChild("leaderstats")
        local cashStat = leaderstats and leaderstats:FindFirstChild("Cash")

        if not cashStat then
            return false
        end

        cashStat.Value += 2500

        return true
    end,
}```
junior whale
#

Destroy() aint working anymore ig

vocal valley
#
    local success, result = pcall(
        purchaseHistoryStore.UpdateAsync,
        purchaseHistoryStore,
        receiptInfo.PurchaseId,
        function(isPurchased)
            if isPurchased then
                return isPurchased
            end

            local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
            if not player then
                return nil
            end

            local grantPurchaseHandler = grantPurchaseHandlerByProductId[receiptInfo.ProductId]
            if not grantPurchaseHandler then
                warn(`No purchase handler defined for product ID '{receiptInfo.ProductId}'`)
                return nil
            end

            local handlerSucceeded, handlerResult = pcall(grantPurchaseHandler, receiptInfo, player)
            if not handlerSucceeded or handlerResult ~= true then
                warn(`Grant purchase handler failed for '{player.Name}' of product ID '{receiptInfo.ProductId}'`)
                return nil
            end

            return true
        end
    )

    if not success then
        local errorMessage = result
        warn(`Failed to process receipt due to data store error: {errorMessage}`)

        return Enum.ProductPurchaseDecision.NotProcessedYet
    end

    local didGrantPurchase = result == true
    return if didGrantPurchase
        then Enum.ProductPurchaseDecision.PurchaseGranted
        else Enum.ProductPurchaseDecision.NotProcessedYet
end


MarketplaceService.ProcessReceipt = processReceipt
torn cargo
#

its not giving u any errors

#

?

vocal valley
#

this is what i use to prompt mps:PromptProductPurchase(player, productId)

torn cargo
#

ya

#

mhm

vocal valley
#

nothin in output

torn cargo
#

and its not prompting

#

?

vocal valley
#

it is prompting

#

i can buy it

torn cargo
#

mhm

#

but not doing what?

vocal valley
#

it's not giving me the cash

torn cargo
#

local didGrantPurchase = result == true
return if didGrantPurchase think this is the problem

#

the format is weridf

#

maybe

#

dgp = true/false if dgp = true and result then..... return result

vocal valley
#
    if didGrantPurchase == true then
        return Enum.ProductPurchaseDecision.PurchaseGranted
    else
        warn(`Purchase already granted for purchase ID '{receiptInfo.PurchaseId}'`)
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end```
#

this better?

torn cargo
#

ya

#

did u js redo

#

?

vocal valley
#

yeah i just followed what u said

torn cargo
#

ight bet run it

vocal valley
#

still don't work

#

idk y it doesn't, everything seems right

torn cargo
#

debug

#

then

#

find with line it doesnt work on

#

and go from there

#

i gotta go shower

vocal valley
#

ok

torn cargo
#

im not sure tbh

vocal valley
#

thanks for your help

torn cargo
#

np

wild kayak
#

10k rbx

#

Dms

neat tree
#

what

dense wren
lost pebble
# dense wren No no, they were all scattered in multiple scripts i just combined them all here

oh. well it's just using methods of PhysicsService (some deprecated):

Class.PhysicsService primarily contains methods for working with collision
groups
which define whether a set of parts may or may not collide with parts
in other collision groups. You can register a collision group through
Class.PhysicsService:RegisterCollisionGroup()|RegisterCollisionGroup() and
assign parts to it by setting those parts'...

tired surge
#

Question, im trying to make my first game where basically blocks flying towards the map to target players and players have to dodge the blocks to survive however im not sure where to start in terms of scripting i did a few attempts but it just wont work, anyone mind helping?

kindred bolt
random pine
#

Looking for a scripter to Fix up some scripts and Fox bugs in my game (Paying with Robux) dm me if interested

graceful cairn
#

i dont FUCKING UDNERSTAND THIS shit

#

im crashing out

#

why the fuck is it not working

kindred bolt
random pine
#

What channel

kindred bolt
#

u need to use /post

kindred bolt
dusky pendant
agile monolith
#

is one modulescript with 1635 lines of code good?

#

primarily, I just put different functions into one module script

somber vault
agile monolith
somber vault
#

you could try splitting the module into 2-3 parts if there are some functions that aren't similar

somber vault
agile monolith
somber vault
#

i recommended keeping those 2 functions in the same module

#

and also any other effect function

agile monolith
#

Got it, although, I'll just keep it as one module script and organizing them through comments

frank quiver
stark vault
#

any recommendation on how to learn Luau?

placid scroll
somber vault
#

Hello

#

@placid scroll

placid scroll
#

hello

#

@somber vault

somber vault
#

Sorry for ping

#

My timeplayed leaderboard is broken some players reported to have their timeplayed suddenly resetted

frank quiver
#

Find something cool you wanna do at varying levels in Roblox studio and then once you get stumped after trying your hardest search how other people did it and try using that info for more than verbatim what they did it for

#

Like say for instance you didn't know how to do a fling script so you searched up verbatim "fling script" figured it out, and now you gotta repurpose it to something else like if you touch a cube now it flings instead of you

#

That helps drill ideas into your head

clear flame
ruby iron
#

best way to clear exploiters is with honeypot remote events and delayed ban waves

sharp basalt
#

yo can someone help me with a script to change character models?

hushed sluice
#

Does anyone want to make a my singing zombie game with me payments in percentage

blazing oasis
#

Roblox isnt even a kids game anymore

ruby iron
worn oak
#

Who wants to invest in my game dm me

rapid verge
jovial crown
#

how to counter

wild kayak
#

Selling full games

#

Cheap

frigid otter
#

anyone for hire
??

hearty robin
#

Who is pro dev Or who help me with some script

jovial crown
#

@hearty robin someone w the skills roles green of scripters purple music composers

barren comet
#

is it possible to make a non-spatial audio emitter?

fair copper
#

what do people use to have a responsive camera for movement systems?

frosty moat
#

im trying to start a small community of devs for talking and helpin anyone interested dm me

jovial crown
#

@frosty moat This server is jus wha t u typed

long scaffold
wild kayak
#

Selling full games dms

long scaffold
#

i was messing around a little and it kinda works

#

local function RainyByMe ()
local part3 = Instance.new("Part")
local Tweening = game:GetService("TweenService")

local goalTween = {Position = Vector3.new(math.random(-81, 63), -40, -74)}
local infoTween = TweenInfo.new(7, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 1000, true)
local moveTween = Tweening:Create(part3, infoTween, goalTween)

part3.Parent = game.Workspace
part3.Name = "RainPart"
part3.Anchored = false
part3.Position = Vector3.new(math.random(-55, 55), 100 , math.random(-55, 55))
part3.Material = "SmoothPlastic"
part3.BrickColor = BrickColor.new("Toothpaste")
part3.Transparency = 0.7
part3.Size = Vector3.new(0.08, 4.5, 0.08)
part3.CanCollide = false
part3.CastShadow = false

moveTween:Play()

end

while true do
task.wait(0.01)
RainyByMe()
RainyByMe()
RainyByMe()
RainyByMe()
end

#

i just dont know how to rotate the parts inside a script

solar helm
#

!codeblock

long scaffold
solar helm
#

;codeblock

#

Aaah

#

undefined - Please use a codeblock so your code can be more easily read by helpers.
You can copy and paste the following:
```lua
print("Hello, world!")
```
Output:

print("Hello, world!")

If you're having trouble finding the tilde key on your keyboard, see the attached image which has the key boxed in red.

stuck egret
#

how can i make a drag system like the 99 nights in the forest?

rapid eagle
#

WHY ARE U CALLING IT SPACES

#

AHH

#

it's called Indentation

gaunt drift
#

sorry!

stiff citrus
#

is this a good layout

shrewd hedge
#

but ye

cinder basalt
soft hornet
#

I already know but to make sure what’s ipairs and pairs again?

stiff citrus
atomic trench
#

whats the difference between type and export type

gloomy kraken
south portal
#

Does anybody know where you can find like

#

How do I say that

#

Learning objectives?

#

Like "Write an If statement that does x"

#

For practice

soft hornet
#

The “default” is just the normal for loop?

hollow panther
#

like it doesnt need to be complicated they can just say for example make a working flying platform

south portal
#

alr tysm

rapid eagle
#

no doesn't mean u can just do : type

#

so like if u have a moduule storing types

#

or sm

worn oak
#

Who wants to invest in my game already have 1

hearty summit
#

is there any pro pro scripters here

#

I have preformance quesiton about code

#

and roblox forums is taking a year

#

I'm wasting this zyn

#

which one is more preformance friendly this will be runned in a renderstepped connection

static coral
static coral
static coral
hearty summit
static coral
hearty summit
#

it's having an else statement vs changing a variable

#

which one is more preformance friendly

hearty summit
#

but I might make it client

static coral
#

free performance boost

#

and i dont see that you are using much roblox api so its eligible

hearty summit
#

what's a native function lol

static coral
hearty summit
#

oh okay

#

yeah I had a feeling

static coral
#

but you should use them carefully

hearty summit
#

I'm good

static coral
#

api heavy operations and some other things will deoptimize it

hearty summit
#

but thanks for the mention

static coral
#

and it will use more memory

hearty summit
#

hm

static coral
#

you can do it like this:

@native function native()

end
static coral
#

just add native tag

#

and it will execute faster

hearty summit
#

what the flip

static coral
#

and also

#

im not sure if lua is smart enough to cache it but i think pre declaring your variables before a loop will be faster than declaring them in every iteration, for example

local current
for i = 1, 10 do
  current = i
end

instead of

for i = 1, 10 do
  local current = i
end
#

also @hearty summit when using native, use type annotations

#

it will make it even more optimized

hearty summit
#

i don't even know how to do allat cause I haven't bothered learning

#

(lazy)

static coral
#

its just specifying the data type of your variables

hearty summit
#

ah

#

ohhhhhh

#

I've seen it be used before

#

but never understood the use of it

#

seems so extra to me

#

but yeah it makes sense now 😭

#

okay thanks gangster I will learn how to do all that now

static coral
#

before you do

hearty summit
#

and you can do those in tables?

static coral
#

let me get the luau typechecking docs for you

hearty summit
#

bros setting me up rn

#

mkmk

static coral
# hearty summit and you can do those in tables?

for tables the syntax is

local EmptyTable: {}
local StringTable: {string}
local StringOrNumberTable: {string | number}
local dict: {[string]: number}
--note that not specifying the key type will default it to number
#

there is also much more you can do with tables

hearty summit
#

oh

static coral
#

but thats the basic dict and array like table types

#

here

#

it explains everything about typechecking

hearty summit
#

hm

static coral
#

also

#

dont worry about type functions, types library or generic types rn as you dont need them for what you are trying to do (probably)

#

unless you really want to learn about them

hearty summit
#

alright

#

well I gotta get better somehow

static coral
#

type annotations make your code tuff

sharp python
#

do you guys got any ideas why the 2nd code is not functional- 1 week into scripting

static coral
#

next

#

remember when your character touches a part

hearty summit
#

alright I go now thanks king

static coral
#

the "hit" part will be the body part that touched

#

so you are trying to get the player from the character's foot

#

and for the method you need to pass in the player's character model

#

so you should instead do

#

hit:FindFirstAncestorOfClass("Model")

#

then if checks

#

@sharp python

sharp python