I sometimes get this error: FireClient: player argument must be a player object and it's just sometimes that this happens, and it doesn't detect it was a player even tho it was. This fires the event: (server script)
local brick = script.Parent
local brickTouchedEvent = game.ReplicatedStorage.Events.BrickTouched
local debounce = false
brick.Touched:Connect(function(hit)
if not debounce then
debounce = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
brickTouchedEvent:FireClient(player)
print(player.Name.."opened the gui!")
wait(4)
debounce = false
end
end)
And this sets what the event does: (local script)
brickTouchedEvent.OnClientEvent:Connect(function()
gui.Enabled = true
gui.Frame.bmw.GoLeftShowHOON.Visible = true
gui.Frame.bmw.GoRightShowPOR.Visible = true
gui.Frame.Close.Visible = true
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = workspace.Cameras.BMWPart.CFrame
char.Humanoid.WalkSpeed = 0
script.Disabled = true
end)

1 comment
I agree his script was to clouded from the start with an easy fix