String gsub method failing to work

Title says all. Code:

local res = ban:GetAsync(tostring(player.UserId))
		local str = [[
		You are currently banned from Voidquake Clicker.
		
		Your ban reason: %s^dat.
		Your ban will never expire.
		
		You can appeal this ban at <communication link [hidden only for this purpose]>
		]]
		
		str:gsub('%s^dat.', res .. '.', 1)
		player:Kick(str)

Never mind! I just have to just ‘dat’ not %s^dat

1 Like

Just in case anyone is wandering in here wondering more:

Looks like you should be using string.format instead.

local res = ban:GetAsync(tostring(player.UserId))
local str = [[
		You are currently banned from Voidquake Clicker.
		
		Your ban reason: %s.
		Your ban will never expire.
		
		You can appeal this ban at <communication link [hidden only for this purpose]>
		]]

player:Kick(string.format(str, res))
1 Like