Hi, I’m currently making a simple sword fightning game, and I’m not really of an advanced scripter and I’m learning, so I keep the game simple. Now to my problem. The game works so that when you join the game there is a GUI with a play button and when you click the play button, you spawn on a platform with a table with a sword on it. And it’s intended so that when you click on the sword you get it and is moved to an arena where all the players fight. But i don’t know how to make it so when you click it you get moved there. I have searched on the internet, and I’m also not so good at scripting, so it’s hard to know how to make it. If someone has a solution please reply here down. Thank you
My script:
local Tool = script.Parent.Parent
local ClickDetector = script.Parent.ClickDetector
ClickDetector.MouseClick:Connect(function(Player)
Tool:Clone().Parent = Player.Character
local character = Player.Parent:WaitForChild("Character")
character.Position = Vector3.new(-114.008, 1.5, 26.29)
end)
script.Parent.CanTouch = false --Just to make the sword equipable only by clicking it, not touching it
Have a nice day!