- What do you want to achieve?
I have a button and when the button is clicked it actives a remote event which leads straight to the server. In the server script, it creates an 'imageLabel' and then sets the player's head to the imageLabel. However, as it is server-sided I expected it to show for everyone, however, it only shows for the local player.
- What is the issue?
The only issue is that it only shows in the client's screen, but doesn't show everywhere else. I want it to show the local player who clicked the button on everyone's screen.
- What solutions have you tried so far?
I've looked everywhere for the solution to my problem but haven't come across anything, that's why I resulted to trying here.
This is what I have tried:
Local script:
script.Parent.readyToStart.MouseButton1Click:Connect(function(player)
remoteEventPlayer:FireServer(player)
end)
Server script:
local remoteEventLocalPhoto = game.ReplicatedStorage.robloxLocalPhoto
local function playerPhoto(player)
--setting up the image label
print(player.Name)
local remoteEventLocalPhoto = game.ReplicatedStorage.robloxLocalPhoto
local typingChallenge = player.PlayerGui.typingChallenge
local otherRacePosition = typingChallenge.otherRacePosition
local newImage = Instance.new("ImageLabel", otherRacePosition)
newImage.Name = player.Name
newImage.Position = UDim2.new(0, 0,0, 0)
newImage.Size = UDim2.new(0.06, 0,0.998, 0)
newImage.BackgroundTransparency = 1
-- setting the image label to the player's head
local UserId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size100x100
local players = game:GetService("Players")
local content, isReady = players:GetUserThumbnailAsync(UserId, thumbType, thumbSize)
newImage.Image = content
end
remoteEventLocalPhoto.OnServerEvent:Connect(playerPhoto)

1 comment
I recommend adding an output.