i have a server script sending a clientevent to the local player. in play mode everything works perfectly. but in multiplayer it comes up with this error
attempt to index global 'button' (a nil value)
Before you say that "Nil means that it doesnt exist" it does exist, like i said it works in play mode so if it is working in play mode, it means the variable does exist, doesnt it?
Heres the server script
function clicked(player, button) local Button = button game.ReplicatedStorage.Remotes.PlayerCrateClick:FireClient(player,Button) end game.ReplicatedStorage.Remotes.CrateClick.OnServerEvent:Connect(clicked)
Heres the function in a local script
function clicked(Button) button = Button button.Parent.BackgroundColor3 = Color3.new(115/255,115/255,115/255) openbutton.Visible = true openbutton:TweenSize(UDim2.new(0, 200, 0, 70), "Out", "Bounce", 1) end