#Need help with script not working
50 messages · Page 1 of 1 (latest)
** You are now Level 2! **
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
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
** You are now Level 4! **