Im getting (The function InvokeClient is not a member of "Player") in output?
I tried having the client side reading a server side number value in the player but dosnt read the value right:
Client-Side:
01 | local Values = game.ReplicatedStorage:WaitForChild( "RemoteFunction" ) |
03 | script.Parent.ClickDetector.MouseClick:Connect( function (player) |
04 | if script.Parent.Parent.Player.Value = = "" then |
05 | script.Parent.Parent.Player.Value = player.Name |
07 | if player.Name = = script.Parent.Parent.Player.Value then |
08 | print ( "jwilenqgnblqnbw" ) |
09 | local equiped = Values.InvokeClient(player) |
11 | player.Character.Humanoid:EquipTool(player.Backpack:FindFirstChild(equiped)) |
13 | if equiped = = "lvl1" then |
14 | script.Parent.Parent.Hits.BillboardGui.Damage.Text = script.Parent.Parent.Hits.BillboardGui.Damage.Text - 5 |
16 | script.Parent.Chop 1 :Play() |
17 | script.Parent.Parent.Particles.ParticleEmitter.Enabled = true |
19 | script.Parent.Parent.Particles.ParticleEmitter.Enabled = false |
21 | local axe = player.Character:WaitForChild(equiped):Clone() |
22 | axe.Parent = player.Backpack |
23 | player.Character:FindFirstChild(equiped):Destroy() |
25 | print (script.Parent.Parent.Hits.BillboardGui.Damage.Text) |
26 | if script.Parent.Parent.Hits.BillboardGui.Damage.Text = = "0" then |
27 | script.Parent.Parent.PrimaryPart = nil |
28 | print ( "Event fire attempt" ) |
29 | game.ReplicatedStorage.Logg:FireClient(player) |
32 | game.ReplicatedStorage.RemoteEvent:FireAllClients(script.Parent.Parent) |
Server-Side localscript in playerstarterscriptps:
2 | return script.Parent.Parent.AxeLvl.Value |
5 | game.ReplicatedStorage.RemoteFunction.OnClientInvoke = invoke |