#Messing around with a key tool and its glitching

79 messages · Page 1 of 1 (latest)

chrome shell
#

as soon as I pick up the key it teleports me to the sky

azure sparrow
#

Unanchor the key

chrome shell
#

Ive tried so many things lmao

#

Im using weldconstraints

#

i also have the plugin

#

if i unanchor it, it falls through the map

azure sparrow
#

If it’s a tool it’l go in ur hand ?

chrome shell
#

alright, so, the tool isnt in starterpack, does it have to be?

#

its a walkover pickup

azure sparrow
#

Make it so when you walk on it the tool is cloned in ur backpack

#

If it’s not in workspace it won’t fall

chrome shell
#

oh, okay. I'll i try

azure sparrow
chrome shell
#

So I put it in starterpack correct?

#

I'm sorry btw, I'm a new studio user

azure sparrow
#

Idk, if you put it in starter pack, when a player join he will have the tool automatically no matter what

chrome shell
#

Yeah, but I dont want the player to have the key automatically. I want it to obtained by walking over it.

azure sparrow
#

You have a script for that rn ?

chrome shell
#

Not right now currently. I made this like 5 minutes ago.

azure sparrow
#

Ok so you should make a key in your workspace (the one that the player will walk on) and anchor it
And on your script you detect when a player walk on it (.Touched)
And then give the key tool to the player directly in his backpack. To give it you just have to clone the tool and make sure that the tools part are unanchored.

chrome shell
#

ill make a brand new key rq

azure sparrow
#

Or

#

You put you key tool in workspace but set the properties CanCollide to true but Anchored to false

azure sparrow
chrome shell
#

i put the key in workspace, and set the actual tool to cancollide true but anchored to false

azure sparrow
#

Did it worked ?

chrome shell
#

wdym by cancollide true key, you talking about the parts?

#

inside the key?

azure sparrow
#

Yes the parts

chrome shell
azure sparrow
#

All the parts are unanchored ?

chrome shell
#

Including the handle?

azure sparrow
#

Yes

chrome shell
#

Yes.

#

The handle should be cancollide false correct?

azure sparrow
#

Yes

chrome shell
#

yeah, it wont work.

#

What is a touchinterest?

#

hold on wait

#

there was a touchinterest in the tool other than the handle

#

i can pick it up now

#

But I also wanted to make the key unable to collide with walls, etc

azure sparrow
#

You have to script then

chrome shell
#

yeah, scripting starts now

#

you know any scripts?

azure sparrow
#

Give me a min

chrome shell
#

alrighty.

azure sparrow
#

You do you know how to script ?

chrome shell
#

I understand logics but and some simple scripts but I 100% no.

azure sparrow
#

Uh I’m on phone it’s a bit hard

#

Make a local script under your tool

#

And put this script

#

local tool = script.Parent

local function toolEquipped()
for _, v in pairs(tool:GetChildren())
if v:IsA("BasePart") then
v.CanCollide = false
end
end
end

tool.Equipped:Connect(toolEquipped)

#

Normally I wouldn’t give you the script ready but I want to sleep and I don’t want to leave with no solution

#

If it doesn’t work use a normal script

chrome shell
#

"if" has an error

azure sparrow
#

Add a "do" at the end of the line where the is "for"

chrome shell
#

??

azure sparrow
#

Show my lines numbers please

chrome shell
#

ok gotchu

azure sparrow
#

Change the

#

"GetChildren" by GetDescendants

#

And it should work

chrome shell
#

thank you so much!

#

i was trouble shooting with AI for so long lmaoo

#

good night

#

i want to sleep

#

may i add you?

#

before i close the post

azure sparrow
#

If you want but I won’t make any more script for you

indigo perchBOT
#

studio** You are now Level 11! **studio

azure sparrow
#

I’ll tell you where are your errors if you want

chrome shell
#

yes.