So I keep getting the error, String expected, got object. Line 5: Bad argument #2 to '?'
NormalParts = {["Slab"] = true,["Wall"] = true,["Plate"] = true}
local event = script.BlockInsertation
event.OnServerEvent:connect(function(name)
local chil = game.Workspace[name]:GetChildren()
for i, v in pairs (chil) do
if NormalParts[v.Name] then
local clone = workspace:FindFirstChild(name).Slab:Clone() or workspace:FindFirstChild(name).Wall:Clone() or workspace:FindFirstChild(name).Plate:Clone()
clone.Parent = game.Workspace
else
script.Parent.MoneyDisplay.ErrorDisplay.Description.Text = "Undefined part value"
script.Parent.MoneyDisplay.ErrorDisplay:TweenPosition(UDim2.new(0.8, 0,0.9, 0),"InOut","Linear",1,false)
for i = 5, 1, -1 do
wait(1)
script.Parent.MoneyDisplay.ErrorDisplay.Timer.Text = i
end
script.Parent.MoneyDisplay.ErrorDisplay:TweenPosition(UDim2.new(1.3, 0,0.9, 0),"InOut","Linear",1,false)
script.Parent.MoneyDisplay.ErrorDisplay.Timer.Text = "tim"
end
end
end)

3 comments
Is FireServer being used in a LocalScript?
yes
Wait a second, I have a question. Do you have to include the player parameter inside of the fireserver in the localscript?