I want to make a stamper script kind of like hackthon. (whatever they call it) I made this script:
local storage = game:GetService("Geometry") local player = game.Players.LocalPlayer local key = player:GetMouse() key.KeyDown:connect(function() if key == "x" then local part = Instance.new("Part", storage) part.Name = "block" end end) key.Clicked:connect(function() local buildbrick = storage.block:Clone() buildbrick.Parent = game.Workspace buildbrick.Position = key.Hit.p end) key.KeyDown:connect(function() if key == "y" then local tpart = Instance.new("TrussPart", storage) tpart.Name = "truss" end end) key.Clicked:connect(function() local buildtruss = storage.truss:Clone() buildtruss.Parent = game.Workspace buildtruss.Position = key.Hit.p end) key.KeyDown:connect(function() if key == "z" then local bpart = Instance.new("Part", storage) bpart.Shape = "Ball" bpart.Name = "ball" end end) key.Clicked:connect(function() local buildball = storage.ball:Clone() buildball.Parent = game.Workspace buildball.Position = key.Hit.p end)
I put the script in starterpack.(since localscripts run in backpacks.) When I tested, I pressed 1 key at a time and clicked for each one. Nothing was created. There was also no errors in the output. Can someone point out the problem?
Thanks for reading!
NOTE: I used the geometry service since those parts are based on geometry. I tested the storage by going to online studio by merely, then inserting the disco ball into geometry. It Worked fine.