Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.