I have a jar (cookies inside) inside the jar brick is a normal script:
script.Parent.ClickDetector.MouseHoverEnter:Connect(function(p) game.ReplicatedStorage.jarguion:FireClient() end) script.Parent.ClickDetector.MouseHoverLeave:Connect(function(p) game.ReplicatedStorage.jarguioff:FireClient() end)
i manualy checked everthing. the remote event is there, same name(s), gui is named same thing, its there, output says:
Argument 1 missing or nil
please help, it worked before, the only difference is that this is a client event and my others are server events and they work.
Use :GetService() to retrieve the ReplicatedStorage
Use :WaitForChild() to make sure something exists before using or changing it
The first parameter of :FireClient() is always the player instance, since the ClickDetector automatically gives you the player through its parameters, just add the variable name to the FireClient section
local remote = game:GetService("ReplicatedStorage"):WaitForChild("jarguion") local click = script.Parent:WaitForChild("ClickDetector") click.MouseHoverEnter:Connect(function(p) remote:FireClient(p) end) click.MouseHoverLeave:Connect(function(p) remote:FireClient(p) end)
i tried making normal script in starterpack:
game.ReplicatedStorage.jarguion.OnServerEvent:Connect(function() print("gui on") end)
but it doesnt print that, so what now?