How do I get a tool onto my player's arm?

  1. What do you want to achieve? Allowing the player to hold their flashlight from a gamepass.

  2. What is the issue? The flashlight only stays in it’s original spot.

  3. What solutions have you tried so far? A few posts I found I thought would help, but ended up being unhelpful after looking at them,

Here is the video of the issue robloxapp-20201114-1440461.wmv (2.2 MB)

Here is the directory:


The local script is for toggling the tool BTW.

Help would be appreciated! Last time I had a problem, it was as simple as changing a piece of code.

1 Like

Did you try to UnAnchore it?
Im not good at making games,
But you could give it a try xD

I have, and the weld script also says it must be anchored. Confuses me, I know.

Well i have the same glitch in one of my testing place. Ill try some things, if some of them works, ill tell you :wink:
Good Luck!

1 Like

Thanks man, you too!

30charlim

Is your tool cloned and moved to the player’s Starter Pack when the player’s gamepass ownership is confirmed on a server script?

If it is just being made visible from ServerStorage to Workspace, it wont work as a tool for the player. I am not sure where the gamepass is checked or where its moved, since there is no reference to any server script.

Oh, I should show you the give script. It basically just clones it and parents it to the player’s backpack.

Is that a LocalScript or ServerScript?

That’s a local script. Should have noted that.

LocalScripts can’t access ServerStorage, I recommend using ReplicatedStorage instead

Hello, im back, i wasn’t able to fix it
I tried copying same Handle and Tool settings from basic ROBLOX Sword. Which also didn’t help
But i remembered that when i was making my tycoon i had same problem with one of guns and i think i fixed with somenthing that had somenthing with Position
I am bad scripter, builder
And im not proffesional
So please if you don’t understand or i won’t be able to help, sorry.

1 Like

ok, the weld script is probably the main reason why it isn’t working
you can try something like this as a substitue:

local Handle = script.Parent -- the target object

for _, object in pairs(Handle.Flashlight:GetChildren()) do
    if object:IsA("BasePart") then -- check if the object is weld
        if object.Anchored then object.Anchored = false end -- un-anchor the object

        local weld = Instance.new("WeldConstraint") -- create a new WeldConstraint Instance
        weld.Part0 = object -- the base object is the main
        weld.Part1 = Handle -- weld to Handle
        weld.Parent = object -- parent the weld to the object

        -- if the object isn't welded correctly then try switching Part0 and Part1's instances around
    end
end

-- Server Script as a child of the "Handle" Instance

It shouldn’t be a local script because an exploiter or skid could fake owning that game pass and get the item for free, you should do this in a server script using the player:PlayerAdded() function.

5 Likes

Thats actually pretty smart! :heart:

Or he could just use a plug-in like moon animation suite which has a builtin welder (this is what I use for welds and animating)

1 Like

I could provide an example script once I get home and am able to use my computer as I’m on my phone rn (lol :laughing:)

Make sure to have all scripts handling giving and confirming on the server side, since it can access Server-Side services and is also safer. :+1:

Sorry I haven’t been replying. Was too busy chatting with a friend about core games. I’ll try and use all solutions now.

Doesn’t work. Still teleports me to the orginal position.

Welding doesn’t need to have parts anchored.

Can you send me the Flashlight tool?