I am currently working on an dealership system, I am using an BindableEvent to show the vehicle purchase frame, however it is not working and i cant spot any error in it
Here is the code:
local CarParams = game.ReplicatedStorage:WaitForChild("GetCarParams"):InvokeServer(script.Parent.Name)
local CarImage = script.Parent.CarImage
local ShowPurchaseFrame = script.Parent.Parent.Parent.Parent.Parent.ShowPurchaseFrame
script.Parent.CarName.Text = CarParams.Name
script.Parent.Cost.Text = CarParams.Cost
script.Parent.MouseButton1Down:Connect(function()
ShowPurchaseFrame:Fire(CarParams.Name, CarParams.Cost, CarParams.Power, script.Parent.CarImage)
end)
There seem to be a lot of errors, from what I can see they are mostly ‘unable to find’ something type errors.
I would say the issue is almost certainly in a different script which means the showPurchaseFrame function isn’t being connected to the bindable event.
This could be something as simple as a folder being named incorrectly, or some part not loading before the script looks for it.
Start by checking the script where, ShowPurchaseFrame.Event:Connect(function) appears.
I am slightly confused as to the set up here.
Bindable events can’t fire across the client-server boundary, remote events can but are called by :fireClient or :fireallclients or :fireserver.
I assume this is on the client using a bindable event, but the client has no access to serverstorage only replicated storage.
So, you will need to either,
Change the event to a remoteevent to run a serverside function to gain access to serverstorage and change the playergui from there, or,
Move the info to replicated storage.