local Clicker = script.Parent --ClickDetector local Object = game.ReplicatedStorage:WaitForChild("Car") local ObjectSpawn = game.Workspace:WaitForChild("Spawner") Clicker.onClicked:Connect(function() local CloneObject = Object:Clone() CloneObject.Parent = game.Workspace ObjectSpawn.CFrame.p -- Doesnt work (has a red line) end)
what im trying to do is making a spawn button that spawns a car at the place where the spawner is(not the spawn button but another part) but it doesnt seem to work how do i fix
Your script is good but that's not how you use CFrame l, to change the CFrame propertie of something you should use the equal sign '=' for it and put a CFrame value next to it(This could come from CFrame.new() or another instance's CFrame).
Example:
local part = script.Parent part.CFrame = workspace.OtherPart.CFrame or CFrame.new(1,1,1) * CFrame.Angles(0,math.rad(90),0) -- you can use whether CFrame.new or another instance's CFrame.
Hope this helped :)