Hello, I'm very new to scripting as I've just started learning it yesterday. I'm currently learning functions and events right now. I need help getting this script working properly in the way I want it to.
game.Workspace.TouchPart.Touched:Connect(function(hit) while do true Instance.new("Part", game.Workspace) wait (1) end end)
What this script is supposed to do, is when your character walks on/touches a specific pre-existing part already placed in Workspace, objects would continuously be created at the center of the Baseplate, and you can no longer stop it. That's a basically the whole gist of the script I'm attempting to make.
Any help is useful.
You can use a boolean value to help you with this.
Also it seems that you made a typo with "while true do".
local Touched = false game.Workspace.TouchPart.Touched:Connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then Touched = true end end) while Touched == true do local InstancedPart = Instance.new("Part", game.Workspace) wait(1) end