#Need help with script not working

50 messages · Page 1 of 1 (latest)

leaden fog
#

💀

proper hill
#

bro

#

shop.Visible = true

#

use the variables' name the same way u declare them

modern orbitBOT
#

studio** You are now Level 2! **studio

primal hound
#

show us how you added it into the script

#

true

#

not True

#

True is a var, true is a boolean

#

Lua is case sensitive

#

why are you pulling a triggered event off of a script

#

that script won't ever get "triggered" as it's not one of it's events

#

or wait

#

eh i read that wrong

#

ah good you're here

#

have fun dealing with this

modern orbitBOT
#

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

#

studio** You are now Level 5! **studio

primal hound
#

it isn't finding the proxy when compiling so it doesn't trigger the event

#

so the listener never fires

#

easiest fix is just an task.wait()

#

or a few WaitForChild()s

#

not really

#

a bit ago I was working on a game, this script was just there for 2 types of pallets of bricks. 2 types

local Brick = {}

local CompFolder = game.ReplicatedStorage.Assets.Components

Brick.__index = Brick

Brick.AvailableColor = {
    ["Red"] = CompFolder.Bricks.RedBrick,
    ["Black"] = CompFolder.Bricks.BlackBrick
}



function Brick.new(Color: string, Plr)
    if not Color or not Plr then return end
    return setmetatable({
        BrickModel = Brick.color(Color),
        Size = {1,1},
        PalletAmount = 160                 --change out for realistic number
    }, Brick)
end

function Brick.color(Color)
    if not Brick.AvailableColor[Color] then error(Color.." is not an available ".. script.Name.." Color!") return end
    return Brick.AvailableColor[Color]:Clone()
end


return Brick 

it mostly just connected a bit of information to a part

#

so thrust me, this is still the easy stuff

#

don't worry

#

that's a hierarchy, not even composition

#

composition is way harder to understand

#

css?

#

that's luau

#

luau is way easier

#

you're just using a shitty engine

#

but to be frank, you're also doing something I would always avoid, but I just don't like using proximity prompts

#

why's that?

#

there are better alternatives

#

clickdetector, custom signals, even a .touched event is already better in my eyes

#

it just looks way better

#

doesn't work my ass

#

as I said, just use WaitForChild

#
local proxy = game:GetService("Workspace"):WaitForChild("Part", 3):WaitForChild("ProximityPrompt", 3)
proxy.Triggered:Connect(function()
    print("hi")
end)
#

remove the ,3 from within getsevice, I was tired

#

...

#

eh fuck it

#

you don't have your output open

#

please tell me you had it open when running this

modern orbitBOT
#

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

primal hound
#

welp the console window being painted blue says no

#

and so do you

#

I give up on you