So I'm making it when a player clicks a Gui button it fires the target player and room number to a server script and the server script checks what room number it is and would then clone it into the players backpack. But the if statement never works despite the value.
--Server Script
local roomevent = game:GetService("ReplicatedStorage").remote.roomevent
roomevent.OnServerEvent:connect(function(player, target, room)
if room == 100 then
print("Hey there")
end
end)
--Local Script
local player = script.Parent.Parent.player.Text
local room = script.Parent.Parent.room.Text
local roomevent = game:GetService("ReplicatedStorage").remote.roomevent
script.Parent.MouseButton1Click:Connect(function()
roomevent:FireServer(script.Parent.Parent.player.Text, script.Parent.Parent.room.Text)
end)

2 comments
oh I see i needed the "" because it's a string. the smallest of details make the difference..
And thank you!