Ad
Log in to vote
-1

The parameter part is going red,error:expected 'Player' instance type ?

Asked by 14 days ago
Edited by Xapelize 14 days ago
local GetTimerRemote:RemoteFunction = game.replicatedstorage:Waitforchild("GetTimertext)
local Time:number?,Boosts:table<string>? = GetTimerRemote:InvokeClient(Player)

now the parameter, player is in red, so idk why that's happening

i got error Argument 1 is invalid: expected 'Player' instance type pls help

1 answer

Log in to vote
2
Answered by 14 days ago
Edited 14 days ago

When type-checking a table, don't just write colon then table. Instead, use it like this Table: {any}. Also I noticed you have typographical errors in your script.

local GetTimerRemote: RemoteFunction = game.ReplicatedStorage:WaitForChild("GetTimertext")
local Time: number?, Boosts: {string}? = GetTimerRemote:InvokeClient(Player)

Here's a tutorial for type-checking if you want.

Ad

Answer this question