local repplcmt = game:GetService(“ReplicatedStorage”).POVComps.BBComics.CopyComicPlacements
local reptools = game:GetService(“ReplicatedStorage”).POVComps.BBComics.ComicTools
local ComicPlacement = script.Parent
for _, v in pairs(repplcmt:GetChildren()) do
v.OnServerEvent:Connect(function(Player,ToolName)
print(“Event fired”)
local ComicTool = reptools:FindFirstChild(ToolName)
ComicTool.Parent = game.Workspace
ComicTool.Handle.CFrame = ComicPlacement.CFrame
ComicTool.Handle.Anchored = true
end)
end
I just added line to destroy the tool the player is holding when they click on the part but yeah it is the same script in each.
local repplcmt = game:GetService("ReplicatedStorage").POVComps.BBComics.CopyComicPlacements
local reptools = game:GetService("ReplicatedStorage").POVComps.BBComics.ComicTools
local ComicPlacement = script.Parent
for _, v in pairs(repplcmt:GetChildren()) do
v.OnServerEvent:Connect(function(Player,ToolName)
print("Event fired")
local ComicTool = reptools:FindFirstChild(ToolName):Clone()
Player.Character:FindFirstChildWhichIsA("Tool"):Destroy()
ComicTool.Parent = game.Workspace
ComicTool.Handle.CFrame = ComicPlacement.CFrame
ComicTool.Handle.Anchored = true
end)
end
Nope but I think I might just leave the server script as is since it seems to complicated to shrink. At least the local script is much smaller/efficient though
oh- LOL well if there are 16 tools total and 16 possible places to place them on… wouldnt i need a remote event for every single combination of a tool and placement it can go on?
Im still new to scripting and ive been learning as i go/plus learning from the help ive gotten here recently. I dont know how to do that yet but maybe i can look more into local to script remote events and stuff.
Thanks! I still will try to look into this though, because thats what I had to do to even get to where I am now. I had to look into using remote events to copy my tool over and make sure it showed for other players in the game as well
ok! I will get back to you maybe tomorrow since it is late for me now. I’ll try to work on it on my own and let you know! I’ll make sure to message you, and thanks again! c: