For some reason my one local script is saying everything is nil. The script looks fine from my view so I’m not sure if there’s something I’m doing wrong.
Script:
local Events = game:GetService('ReplicatedStorage').Dealership_Events
local function ResizeBar(percent, Inside)
Inside:TweenSize(UDim2.new(percent/100, 0, 1 ,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1, true)
end
script.Parent.MouseButton1Click:Connect(function()
Events.SpawnVehicle:FireServer(script.Parent.Parent.Name, script.Parent.Parent.Parent.Parent.WhichDealership.Value)
end)
Error:
attempt to index nil with 'MouseButton1Click'
Please can anyone help as I’m very confused with what’s happening.