Hi!
I’m making 2 scripts, the first script is in a proximity prompt in workspace which fires a event using FireClient. But when it fires the event (Event is named bucket) it gives me Argument 1 in the output, the SECOND SCRIPT which actually shows what the event does, is found below
THE ERROR ISNT IN THE FIRST SCRIPT, ITS IN THE LOCAL SCRIPT BELOW.
local PlayerGui = game.Players.LocalPlayer.PlayerGui
local player = game.Players.LocalPlayer
local ObjectiveText = PlayerGui.Objectives.Holder.Fade
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BucketEvent = ReplicatedStorage.Others:WaitForChild("Bucket")
BucketEvent.OnClientEvent:Connect(function()
ObjectiveText.TextLabel.Visible = false
ObjectiveText.BucketEvent.Visible = true
end)
It says there is a problem on line 9, line 9 is where it says ObjectiveText.TextLabel.Visible = false
local Part = script.Parent.Parent
local ProximityPrompt = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
ProximityPrompt.Triggered:connect(function(Player)
workspace.Bucket:Destroy()
script.Parent.Parent:Destroy()
ReplicatedStorage.Others.Bucket:FireClient()
end)
Do FireClient(Player). You need to specify which client you are firing to or it won’t work. You can alternatively use FireAllClients(), if you wish to fire to every client without looping through Players.