First thing you should do, is always use caps whenever needed, so “:Connect“over “:connect”. and :Clone over “:clone”. those methods should not be used at ALL. that is why it errors. so do this. I also see you’re using the “ServerStorage” to store something, well don’t. Why? Because ServerStorage items can ONLY be accessed from Server Scripts. Want something that can be on both the server AND client? (so Local scripts can access?)
Then check out ReplicatedStorage. And PLEASE use GetService when you want to get a service. Indexing a service (game.ServiceName) like that, there is NO guarantee that service is called that. Example, the “RunService” (ClassName) service is called “Run Service”, so upon indexing it as (game.Run Service) wait...that doesn’t work...(game[“Run Service”]) UGH. You get those square brackets...
Local Script in a TextButton
local plr = game:GetService(“Players”).LocalPlayer
local crateClone = game:GetService(“ReplicatedStorage”).toolcrate:Clone()
script.Parent.MouseButton1Click:Connect(function()
crateClone.Parent = game:GetService(“Workspace”)
game:GetService(“Workspace”).Part.CFrame = plr.Character.UpperTorso.CFrame
end)
3 comments
I've change "Torso" to "UpperTorso" because this game is R15 and upon testing output says: Cframe is not a valid member of Model
But, it does spawn the crate in workspace.
the f in CFrame is capital, not lowercase. If it still doesn't work, try replacing CFrame with Position. Sorry for the late response.