Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Tools cloned into the inventory only work in play solo?

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?

2 comments

0

Where is this local script located?

0

The script is located under a button in a GUI that is given to every player: http://imgur.com/nhR3Fx2

1 answer

✓ Accepted answer

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.

1 comment

0

Hey, thanks! I did some experimenting, and I found out that the old sword wasn't working neither with R15 nor with R6, whilst the old time bomb worked just fine with R6. I think ROBLOX should be more careful as they push out these updates, but I think all I'm going to need is a new sword. Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.