#button problem

1 messages · Page 1 of 1 (latest)

spice urchin
mossy mountain
#

You need to use mousebutton1click function

#

Also i don't think you need to do that while loop to make a fade effect, you can just use tween service

spice urchin
spice urchin
mossy mountain
spice urchin
#

yeah

#

also i probably should've said what the game is about

#

its a hangout game similar to flex your badges, with avatars like the future, but if the customizability was from 2007 (no accessories, shirts or pants)

#

im focusing on the ui for now, buy my idea is the pleys that join and customize will be added to a table along with a base 12 string for 12 colors for each part

mossy mountain
#

Hmm ok so is there any errors in your output after you click the button?

spice urchin
wary arrowBOT
#

studio** You are now Level 1! **studio

spice urchin
#

you tell me

mossy mountain
#

And does it print "activated"?

spice urchin
#

doesnt even print anything

mossy mountain
#

Oh i just realized, after you click play i think you want the background frame to be gone right?

spice urchin
#

also here was the original nesting pattern

mossy mountain
#

With a fade effect

spice urchin
#

and yes

#

basically home dissapers, and the while loop fades fadeout

#

fadeout was also supposed to be menus

#

brb in 5 minues

mossy mountain
#

Can you send a screenshot of the script now? Or is it the same way it was before?

mossy mountain
spice urchin
#

same way as before rn

#

also it doesnt print activated

mossy mountain
#

Ohh, so it's wrong

spice urchin
#

im pretty sure connect is after

mossy mountain
#

you need to change the touch tap line to uhh.MouseButton1Click:Connect(function()

#

And then let me see...

spice urchin
#

i have tried all 3

mossy mountain
#

Oh

#

I assume uhh is the play button

#

Right?

spice urchin
#

oh

#

nvm you were right

#

it didnt work the first time for some reason

#

also heres the character

#

ye

wary arrowBOT
#

studio** You are now Level 2! **studio

mossy mountain
#

It's pretty easy to make a fade effect with tween service btw

spice urchin
#

yes

#

1 its easter

#

2 it breaks when the transparency is at 1

#

nvm

#

uh oh

#

i thought the ~= would break it

#

it must've skipped the number

#

what does tweeninfo mean

#

which one is time

mossy mountain
#

Yeah i'm here dw

#

local ts = game.TweenService

ts:Create(YourFrame, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()

wary arrowBOT
#

studio** You are now Level 10! **studio

mossy mountain
#

That's what i do for the fade effects, you can learn more about tween service like: easing style and easing direction for other things too

spice urchin
#

it isnt printing activate again

mossy mountain
#

How is the script now?

spice urchin
mossy mountain
#

It's wrong

spice urchin
#

ok

mossy mountain
#

You need to do like Tweener:Create(Transition, TweenInfo.new(1),{BackgroundTransparency = 1}):Play()

spice urchin
#

oh

mossy mountain
#

At line 15

#

And then delete the thing you made about tween and tweeninfo

spice urchin
#

ok

#

so skip the references

#

?

mossy mountain
#

You can delete line: 8,9,10 and 11

spice urchin
#

nice, one more thing about the ui: i cant fill the screen, even with scale set to 1

#

it works if your wonderingf

mossy mountain
#

Btw at TweenInfo.new(1) you can change the number to whatever number you want the duration of the tween to be

spice urchin
#

yeah

#

i set it to 1 second

#

might be 2 later

mossy mountain
#

I think that's the name of it

spice urchin
#

all 3 keywords brought nothing, but in looking for a check

#

might be archivable

mossy mountain
#

I know it's something that starts with Ignore in the screenGui properties

spice urchin
#

ignoreguilnset

mossy mountain
#

Yes

spice urchin
#

alsi i was looking in frame

mossy mountain
#

That's the name

spice urchin
#

nice one

#

this next will probably be much harder

#

using a button to change the brick color of the character

#

fron the gui

mossy mountain
#

Oh that's easy

spice urchin
#

i guess

#

you can just like the names

#

link

#

and then from there

mossy mountain
#

So you need to make a remote event

spice urchin
#

remote event

#

i saw that lemme get ut

mossy mountain
#

In replicated storagr

#

Storage*

spice urchin
#

ok

mossy mountain
#

Name it like idk: ColorChange

spice urchin
#

(characterpart) color

wary arrowBOT
#

studio** You are now Level 3! **studio

spice urchin
#

there are 6

mossy mountain
#

So i would create a local script in the frame where the button is located

spice urchin
#

ok

#

oh actually i havent got to that yet

mossy mountain
#

Wdym

spice urchin
#

💀

#

see you in an hour

mossy mountain
#

Oh well

spice urchin
#

or 15 minutes

mossy mountain
#

Idk if i'll be online

spice urchin
#

eastern time?

mossy mountain
#

Nope, but if i don't, you can search a tutorial on how to change the color of the character

spice urchin
#

ok

#

good enough for now

#

oh i get it now

spice urchin
#

also the extra model im callise classic, reserved for me or people who helped

#

the one im using is a remake from my own character model

#

because animations look wonky on the classic

#

see you at 12pm (maybe)

spice urchin
#

or maybe not

#

yeah i wont

spice urchin
#

holy shit i skipped using remoteevent

#

ok i'll do an elseif loop to cycle through the colors for now, because its almost 2am

wary arrowBOT
#

studio** You are now Level 4! **studio

spice urchin
#

final script for today

#

adjustment for head

#

Goodnight

spice urchin
#

if you have any ways to optimize it let me know

spice urchin
#

brb

spice urchin
#

fixed the gui so it shows the correct colors 👍, now i wanna make a player detection to set specific startercharacters or have them play their own starter character

spice urchin
#

it isnt working

mossy mountain
#

I'm guessing you want to morph this player

#

That's not how you do it

#

you would need to call player.CharacterAdded function inside the player added one

spice urchin
#

ah

#

like this?

mossy mountain
#

then you would do something like:

player.CharacterAdded:Connect(function(character)
If player.UserId == playerId then
local customCharacter = game.ReplicatedStorage:WaitForChild("LegoCharacter"):Clone()
character = customCharacter
customCharacter.Parent = game.Workspace
end)

mossy mountain
#

You need to call CharacterAdded with the "player" inside the parameter of the playerAdded function

spice urchin
#

HUH

#

this isnt

mossy mountain
spice urchin
#

yeah

mossy mountain
#

It's player.CharacterAdded

spice urchin
#

oh ok

mossy mountain
#

And it's inside the player added function, not the parameter

spice urchin
#

oop

#

like this?

#

guess not

mossy mountain
#

No

#

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)

end)

spice urchin
#

ok

#

sorry

mossy mountain
#

Np, it's just kind hard to explain

spice urchin
#

so more like this?

wary arrowBOT
#

studio** You are now Level 5! **studio

spice urchin
#

uh oh

#

there is two starter characters so the game is having a seizure

#

changing the name doesnt work

mossy mountain
spice urchin
#

im pretty sure load character resets it, triggering the event again

mossy mountain
#

Yeah, you do loadcharacter to unmorph the character, but to morph the character you need to set the character = YourCustomCharacter

spice urchin
mossy mountain
spice urchin
#

how do you set the character

mossy mountain
spice urchin
#

oh makes sense now

#

it just fell apart

#

and kept the original

mossy mountain
mossy mountain
spice urchin
#

yeah

spice urchin
mossy mountain
#

Ok so you probably need to character:Destroy()

spice urchin
#

huh?

spice urchin
#

thats why its funny

mossy mountain
#

After customCharacter.Parent = game.Workspace you need to do character:Destroy()

#

Actually, before the character = customCharacter my bad

#

See if that still keeps the player's og character

spice urchin
#

yes

#

local playerId = 7887319514

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.UserId == playerId then
local customCharacter = game.ReplicatedStorage:WaitForChild("DevCharacter"):Clone()
character = customCharacter
character:Destroy()
customCharacter.Parent = game.Workspace
end
end)
end)

#

serversciptstorage > normal script

mossy mountain
#

the "character:Destroy()"

spice urchin
#

16:07:34.710 Humanoid is not a valid member of Model "O937LEG0" - Client - HealthScript:5
16:07:34.710 Stack Begin - Studio
16:07:34.710 Script 'Players.O937LEG0.PlayerGui.ScreenGui.Health.TextLabel.HealthScript', Line 5 - Studio - HealthScript:5
16:07:34.710 Stack End - Studio
16:07:39.632 Infinite yield possible on 'Workspace:WaitForChild("O937LEG0")' - Studio
16:07:39.632 Stack Begin - Studio

#

also it didnt set my character to anything

#

im gonna take 15 honestly all of this is just way too funny

#

probably gonna forward it to my friend later as a meme

mossy mountain
#

From the morph script

#

Can you delete character:Destroy() and send me a picture of how does it stay when you join the game?

spice urchin
#

the devcharacter is in the same place as my player model

#

it just isnt

#

idk why

mossy mountain
#

It's not moving?

spice urchin
#

no

mossy mountain
#

Well is it anchored?

#

All the parts of it are anchored?

spice urchin
#

none are, and everytime i die it clones again

#

which could explain that memory leak from before

mossy mountain
#

I think you don't need to clone it since it's a dev skin

#

Especially because it triggers when the character loads in the game and it has your id

#

Now about it not moving, it must be because it doesn't have a humanoid or it's not properly rigged, idk

spice urchin
#

humanoid exists

#

and yes it isnt properly rigged

#

oh i forgot the welds

#

i remodeled it

#

might need more time to rig

#

ok the joints are but the others arent

#

nvm its funny

#

all i gotta do is replace the walk sound for him

#

how do i add it to the walking sound

spice urchin
#

found out how, but still cant link it right

mossy mountain
#

What's the script you made

#

?

spice urchin
#

local playerId = 7887319514

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.UserId == playerId then
local customCharacter = game.ReplicatedStorage:WaitForChild("Lego"):Clone()
character = customCharacter
customCharacter.Parent = game.Workspace
end
end)
end)

#

still in the same place

#

im also thinking of tying the sound to this too, so that it replaces the running sound every time the character loads

mossy mountain
#

No, not this one i meant the one you made for the sound when walking

spice urchin
#

i didnt

#

yet

#

i was thinking of tying it to the other character script so that then the character is added back, so does the sfx

wary arrowBOT
#

studio** You are now Level 6! **studio

spice urchin
#

lemme show you the obs

#

attempt 2: proben rotation

#

all orientation is 0

#

attempt 3: finally

mossy mountain
#

It works?

spice urchin
#

in my funny way, yes

#

i put in the angles myself

#

and the torso used to tilt

#

so i set the rootjoint at -9.37 degrees

#

to mimic that tilt

#

no more concrete sound needed

spice urchin
#

uhh

spice urchin
mossy mountain
spice urchin
#

oh the custon character for a specific id?

#

no it doesny

#

oh it isnt renamed is it supposed to be like that

#

no

#

its supposed to not be renamed