Please why model parament nil??
I tried some ways
[NOTE: The function fired!]
local MyModel = script.Parent
local PrimaryPart = MyModel.PrimaryPart
local ClickDetect = PrimaryPart:WaitForChild("ClickDetector")
local Char
ClickDetect.MouseClick:Connect(function(clicker)
MyModel = script.Parent
print("Sucess")
print(MyModel)
game.ReplicatedStorage.Events.Atobj:Fire(clicker)
game.ReplicatedStorage.Events.AtobjClient:FireClient(clicker, MyModel)
end)
local HealthUIF = game.ReplicatedStorage.Events.AtobjClient
local HealthUIFr = game.ReplicatedStorage["Health Gui"]
HealthUIF.OnClientEvent:Connect(function(Clicker,Model)
print("Sucess2")
local CloneUI = HealthUIFr:Clone()
CloneUI.Parent = Model.PrimaryPart
end)
iBuzzes
(Silly_Ryan)
#2
The player instance is not passed when you fire a remote event using FireClient
but if you need it you can use Players.LocalPlayer
Hello Model parameter is nil sorry thanks
the function fired but Model parameter is nil
Intencidy
(smelvin)
#5
Do you get an error saying the parameter is nil? How did you test it?
mroaan
(NightCode)
#6
Because the player parameter is not passed when calling fireClient, so just remove the clicker parameter:
healthuif.onclientevent:Connect(function(Model)
2 Likes
Ehh I test it with print function
system
(system)
Closed
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.