#Fireclient: player argument must be a player argument
27 messages · Page 1 of 1 (latest)
-- Services
local repS = game:GetService("ReplicatedStorage")
-- Variables
local loadOn = script.Parent.LoadOn
local loadOff = script.Parent.LoadOff
local areaStats = script.Parent.AreaStats
local eventLoad = repS.LoadEvent
local eventUnload = repS.UnloadEvent
-- Script
loadOn.Touched:Connect(function(hit, plr)
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
eventLoad:FireClient(plr)
end
end)
loadOff.Touched:Connect(function(hit, plr)
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
eventUnload:FireClient(plr)
end
end)
what argument can I use?
.Touched doesn't pass two arguments, only the hit one
u should get the player like this
local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
ohh
okay
Imma test in a while
but thank you
can you explain for me what is an player argument?
I have some doubts abt it
its just a parameter
:FireClient(...) requires you to pass the player that you wanna trigger the .OnClientEvent on
ohh
** You are now Level 2! **
I understand now
and
this?
-- Check Area's Status
if areaStats.Value == "Workspace" then
Area1.Parent = game.Workspace
print("It's On Workspace!")
end
if areaStats.Value == "ServerStorage" then
Area1.Parent = game.ServerStorage
print("It's On ServerStorage")
end
I wanted to change the value
I changed
-- Check Area's Status
if areaStats.Value == true then
Area1.Parent = game.Workspace
print("It's On Workspace!")
end
if areaStats.Value == false then
Area1.Parent = game.ServerStorage
print("It's On ServerStorage")
end
but still
.