Hi! I'm having an issue here that I have no clue how to fix. I'm not sure if it's a problem with my scripting or just a problem with my game settings. Anyway, I was eventually able to make a script that gave a player a sword and teleported them into a map. Same with a bomb. Both of these clone into the player's inventory successfully and work okay in "Play solo." However, the sword stops working if you run and swing sometimes. I just thought It was a problem with R15 because the bomb worked fine. If you upload the game to roblox or you do a server test, the tools do not work at all. Here is my script:
local button = script.Parent local player = game.Players.LocalPlayer function teleport() player.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(0,50,0)) end function givetool() game.ReplicatedStorage.Weapons.ClassicSword:Clone().Parent = player.Backpack print(player, "has been given a sword") teleport() end button.MouseButton1Click:connect(givetool)
Now, I'm not sure if the script has anything to do with it, but I have no idea what may be causing the issue. Could anybody provide me with some help?
Hey its tygerupercut3 from the other question about this problem. I tried putting the sword in starter pack and it still didnt work. However, adding a Force R6 script, the sword functioned fine. Not sure if that is your issue, but it's worth a try. Old swords and stuff don't work properly with R15.