Unable to cast value to Object FireClient error

I am back once again lol, this time it’s a FireClient error I’m experiencing. So I’m trying to get a object spawned via FireClient but for some reason I keep getting “Unable to cast value to Object” even though the object’s name is there for it to see. I’m using a StringValue for it btw.

print(“OBJECT SERVER SCRIPT TEST”)
script.Parent.MouseButton1Click:Connect(function()
local testpart = script.Parent.Parent.PlayerData:WaitForChild(“CurrentCarValue”).Value
game.ReplicatedStorage.SpawnTestPart:FireClient(testpart)
end)

2 Likes

You need to tell it which Player you want to send it too:

game.ReplicatedStorage.SpawnTestPart:FireClient(Player, testpart)
1 Like