local char = script.Parent
local human = char:WaitForChild("Humanoid")
local humanRoot = char:WaitForChild("HumanoidRootPart")
local cash = game.ReplicatedStorage:WaitForChild("Cash")
local xpPart = game.ReplicatedStorage:WaitForChild("xpPart")
human.Died:Connect(function()
local moneyDropped = math.random(10,25)
local cashClone = cash:Clone()
cashClone.BillboardGui.amountOfCash.Value = moneyDropped
cashClone.BillboardGui.amount.Text = "$" .. tostring(moneyDropped)
cashClone.Parent = game.Workspace
cashClone.CFrame = humanRoot.CFrame == (humanRoot.CFrame.LookVector + Vector3.new(2,2,2))
local xpClone = xpPart:Clone()
xpClone.Parent = game.Workspace
xpClone.CFrame = humanRoot.CFrame == (humanRoot.CFrame.LookVector + Vector3.new(2,2,2))
end)
```this is the eror
```Unable to assign property CFrame. CoordinateFrame expected, got boolean ```
#It wont spawn the xp part
24 messages · Page 1 of 1 (latest)
now try again```lua
local char = script.Parent
local human = char:WaitForChild("Humanoid")
local humanRoot = char:WaitForChild("HumanoidRootPart")
local cash = game.ReplicatedStorage:WaitForChild("Cash")
local xpPart = game.ReplicatedStorage:WaitForChild("xpPart")
human.Died:Connect(function()
local moneyDropped = math.random(10,25)
local cashClone = cash:Clone()
cashClone.BillboardGui.amountOfCash.Value = moneyDropped
cashClone.BillboardGui.amount.Text = "$" .. tostring(moneyDropped)
cashClone.Parent = game.Workspace
cashClone.CFrame = humanRoot.CFrame + (humanRoot.CFrame.LookVector + Vector3.new(2,2,2))
local xpClone = xpPart:Clone()
xpClone.Parent = game.Workspace
xpClone.CFrame = humanRoot.CFrame + (humanRoot.CFrame.LookVector + Vector3.new(2,2,2))
end)```
where im confused
== is used for checking if a value is something or not
You use one = only for setting things
Like a value or variable
o
but == still spawned the cash but not the xp
No you only used 1 = for the cash look again
im lost bro