Yes. I do. Do you need the full script?
Yea you could paste the full script
Yes. Give me one second. My studio just legit crashed… gotta reopen it
Ok here you go:
Gum Handling:
game.ReplicatedStorage.IncreaseGravity.OnServerEvent:Connect(function(plr,increase)
plr.leaderstats.Bubbles.Value = plr.leaderstats.Bubbles.Value + 1
local humanoid = plr.Character:WaitForChild("Humanoid")
humanoid.JumpPower = humanoid.JumpPower + increase
plr.Character.Gum.Size = plr.Character.Gum.Size + Vector3.new(1,1,1)
plr.Character.Gum.HeadPart.Size = plr.Character.Gum.HeadPart.Size + Vector3.new(1,1,1)
plr.Character.Gum.CFrame = plr.Character.Head.CFrame:ToWorldSpace(CFrame.new(0,0,plr.Character.Gum.Size.X/2))
end)
Part of the characterAdded event:
plr.CharacterAdded:Connect(function(char)
local clonedGum = game.ReplicatedStorage.Gum:Clone()
clonedGum.Parent = char
local weld = Instance.new(“Weld”)
weld.Part1 = char.Head
weld.Part0 = clonedGum
clonedGum.CFrame = char.Head.CFrame
weld.C0 = clonedGum.CFrame
weld.C1 = char.Head.CFrame
weld.Parent = clonedGum
clonedGum.CFrame = char.Head.CFrame:ToWorldSpace(CFrame.new(0,0,plr.Character.Gum.Size.X/2))
end)
There is a glitch where when you click, it pushes you to the side a bit.
yes. idk what is up with that either…
I’m not sure if the gum
variable refers to a model or a part. If it’s a model you have to use the SetPrimaryPartCFrame
method on it…
There is no model that I’m cloning. Just a part.
On the ToWorldSpace, should the player.Character.Gum.Size.X/2 be the first number for the CFrame?
Try making an Accessory for the gum to weld it to the player’s head.
- Make an accessory, name it something like “BubbleGum”.
- Put the gum part in the accessory and name it “Handle”.
- Insert an attachment in the handle, it’s name will be the attachment in the rig of the same name that it will be welded to (for example, naming it “HairAttachment” will weld it to the attachment called “HairAttachment” in the rig.
In this case, find an attachment in the rig that’s in front of the head. If there isn’t any, name the attachment to “HatAttachment”. - Parent the accessory to the rig and see how it looks.
- If it isn’t placed right, position the accessory’s attachment differently until you get a good result.
Ok. Trying this right now. Should I anchor the handle?
No. This is just like welding, except it’s for the player.
Hmmm… it isn’t even showing up inside of the character… strange
plr.CharacterAdded:Connect(function(char)
local clonedGum = game.ReplicatedStorage.BubbleGum:Clone()
clonedGum.Parent = char
end)
I made it an accessory, handle, and attachment called HairAttachment. I’ll try HatAttachment
Yeah, it won’t show up in the character…
Try this with a rig from Rig Builder or something so you can see it without having to playtest.
ok I think this is working! Thank you
oh shoot. hmmm still when I resize it by X,Y and Z, it goes all the way around the player
I don’t know how you can size it and position it correctly, I only know how to weld it.
Total side note and has nothing to do with this topic but, you should probably work on a different genre of a game you like or love with passion, patience and skill. Making games like simulators, chart obbies, etc. would get you a lot of funds since star creators would make videos on it and get it popular.
But you would be not interested at all in working on that game after couple of years in developing it except if that kind of game is your passion or something, i guess the gum stick script you’re in need for help would provide some help in the future games of yours like shooting a wet paper and it’ll stick to a surface.
You could align the gum’s rotation to match perfectly where it should be orientated (the side of the hit’s surface), create a weld and make it disappear shortly after or with tween if you want it to be smooth or not if you don’t need to do that, if you use raycast to do this you could create 3 variables for the findpartonray as the “normal” to manage the rotations and stuff.
Hopefully this fixes your problem, if not then good luck.
Resizing a part will break its welds