this worked before i changed it into a remote event, Now i get this error any recommendations? this is the line im getting this error on local url = “https://www.googleapis.com/youtube/v3/subscriptions?part=snippet%2CcontentDetails&channelId=” … channel_id … “&maxResults=10000000&key=”…currentKey
channel_id or currentKey is likely not a string.
Did you also include the player argument in the server script?
Also in your original post you used the ellipsis operator ...
instead of the concatenation operator ..
Probably because you used the Player
parameter of OnServerEvent
:
RemoteEvent.OnServerEvent:Connect(function(channel_id, currentKey) -- this is wrong
RemoteEvent.OnServerEvent:Connect(function(Player, channel_id, currentKey) -- this is correct
local channel_id = 0
local currentKey = 0
local url = [["https://www.googleapis.com/youtube/v3/subscriptions?
part=snippet%2CcontentDetails&
channelId="]]..channel_id..[["&
maxResults=10000000&
key="]]..currentKey
Please format your code correctly in future, thanks & this should work, just make sure you change “channel_id” and “currentKey”.