Unable to assign property

  1. What is the issue?

Unable to assign property Text. string expected, got Instance

  1. Code
local remote = game:GetService("ReplicatedStorage").Alert.Events.Alert
local ui = game:GetService("ReplicatedStorage").Alert.UI.Alert
local player = game:GetService("Players").PlayerAdded:Wait()
local debris = game:GetService("Debris")

remote.OnServerEvent:Connect(function(Text,Time)
  local Alert_Text = Text
  local Alert_Time = Time
  ui:Clone()
  ui.Frame.Text.Text = Text
  ui.Parent = player.PlayerGui
  wait(Alert_Time)
  debris:AddItem(ui,Alert_Time)
end)

Can you show the client script that the is firing the server?

1 Like

sure

local alertr = game:GetService("ReplicatedStorage").Alert.Events.Alert


alertr:FireServer("Test",0.5)

Do you have any instances named Text? If so then that is most likely the issue.

ui.Frame.Text.Text = Text

1 Like

You forgot to add the player as the first argument

remote.OnServerEvent:Connect(function(Player,Text,Time)
4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.