Hello! I need help writing the code. I don't understand Python well, so I'm asking for your help. Working with a team like require, I wanted to write code, but realized that I didn't understand anything(. Now I'll try to explain what I need
we have a team
require(4902600443)("Stand Name" -- the name of the stand(from jojo) that the player will receive-- , "Player Name" --The name of the player who will receive the stand -- )
Here is a list of all, if necessary, it is important that the team does not need to write the full name, but only the first 2 or 3 letters
The World, Code Name : "TW" Star Platinum, "SP" Flamingo Platinum, "FP" Steve Platinum, "STV" King Crimson, "KC" Sans Crimson, "SansC" Crazy Diamond, "CD" Whitesnake, "WS" Made In Heaven, "MIH" Noob Platinum, "NP" The World Over Heaven, TWOH" Golden Experience, "GE" Golden Experience Requiem, "GER" The Hand, "TH" C-Moon, "CM" Silver Chariot, "SC" Silver Chariot Requiem, "SCR" Star Platinum Over Heaven, "SPOH" Star Platinum Requiem, "SPR" The World Requiem, "TWR" Killer Queen, "KQ" I need a code by type:
locaal StandRequire = 4902600443 if "Name_Player" == "XankiallaX" then if Pressed button = N then require(StandRequire)("Stand Name", "Player name")
thank you in advance!
I don't understand anything lol, your module is working fine but, I still don't get what you want, you want to get a stand when the player presses N?
And... how will the player select the stand he wants?
Edit: Ok, i see what you want, keep in mind, since you want to use the KeyCode event, we will need to use a localscript, let's start:
First we make a local script that fires a RemoteEvent everytime the player presses the N key, because remember that UserInputService only works on localscripts
It also picks a random stand from a table of possible Stands
Call this script whatever you want, but MAKE SURE to place it inside StarterPlayerScripts
repeat wait() until game.Players.LocalPlayer.Character -- Wait for the player to load in --- Variables --- local localplr = game.Players.LocalPlayer local RemoteEvent = game.ReplicatedStorage.RemoteEvent -- Change this path to where your remote event is local CallKey = "N" -- The key to call stand local UIS = game:GetService("UserInputService") local Standless = true local Stands = {"TW", "SP", "FP", "STV", "KC", "SansC", "CD", "WS", "MIH", "NP", "TWOH", "GE", "GER", "TH", "CM", "SC", "SCR", "SPOH", "SPR", "TWR", "KQ"} --- Functions --- function SelectRandomStand() local SelectedStand = Stands[math.random(1,#Stands)] return SelectedStand end function CallForStand(input, isChatting) if not isChatting and Standless == true then if input.KeyCode == Enum.KeyCode[CallKey] then local Stand = SelectRandomStand() local PlayerName = game.Players.LocalPlayer.Name RemoteEvent:FireServer(Stand, PlayerName) Standless = false end end end function SetStandless() Standless = true end --- Connections --- UIS.InputBegan:Connect(CallForStand) localplr.CharacterAdded:Connect(SetStandless)
After this, we make a RemoteEvent inside ReplicatedStorage, don't change It's name.
If you wanna change the name or move it somewhere else, you must also change it's location in the "RemoteEvent" variable we made in the localscript
After this, we make a normal script
in ServerScriptService
, you can also call it whatever you want
This script will check for the **RemoteEvent ** we made and recieve its information once fired.
And then it will run the stand require
Again, if you placed the RemoteEvent somewhere else or renamed it, make sure to edit the "RemoteEvent"
variable
local RemoteEvent = game.ReplicatedStorage.RemoteEvent function GiveStand(Player, Stand) require(4902600443)(Stand, Player.Name) end RemoteEvent.OnServerEvent:Connect(GiveStand)
(Keep in mind your stand module only works on R6 characters, not R15)
And that's it, you should read the full code, hopefully you can learn something from it, hope this helps!