While I was making the GUI, I found an error with :FireServer(player).
My script is on a LocalScript:
local function start()
print("startt") -- It prints.
-- [I have disabled this to test if this is the problem ] if PermissionType == 'team' and player.Team == game:GetService('Teams').Host then
game.ReplicatedStorage.SessionStart:FireServer(player)
-- [It's an if statement so disabled the end..] end
end
ButtonFrame.Start.MouseButton1Click:Connect(start)
Although the print works, it doesn’t fire the RemoteEvent.
local function start()
print("start") -- It prints.
-- [I have disabled this to test if this is the problem ] if PermissionType == 'team' and player.Team == game:GetService('Teams').Host then
game.ReplicatedStorage.SessionStart:FireServer()
print("Did this now starting!")
-- [It's an if statement so disabled the end..] end
end
ButtonFrame.Start.MouseButton1Click:Connect(start)
It still doesn’t work thought!
Is it the other LocalScript that receives the :FireServer().
game.ReplicatedStorage.SessionStart.OnClientEvent:Connect(function(host)
script.Parent.HostImage.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=".. host.UserId .."&width=420&height=420&format=png"
local hostusername = host.Name
local textt = script.Parent.HostImage.loltext
end)